|
@@ -1,5 +1,6 @@
|
|
|
package thyyxxk.webserver.controller.singlepage;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -52,9 +53,17 @@ public class LotteryController {
|
|
|
}
|
|
|
|
|
|
@PassToken
|
|
|
- @GetMapping("/selectWonUsers")
|
|
|
- public ResultVo<List<LotteryUser>> selectWonUsers() {
|
|
|
- List<LotteryUser> wonUsers = dao.selectWonUsers();
|
|
|
+ @PostMapping("/selectWonUsers")
|
|
|
+ public ResultVo<List<LotteryUser>> selectWonUsers(@RequestBody List<Integer> request) {
|
|
|
+ if (request.isEmpty()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
|
+ }
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ for (Integer code : request) {
|
|
|
+ builder.append(",").append(code);
|
|
|
+ }
|
|
|
+ String statement = builder.substring(1);
|
|
|
+ List<LotteryUser> wonUsers = dao.selectWonUsers(statement);
|
|
|
return ResultVoUtil.success(wonUsers);
|
|
|
}
|
|
|
}
|