|
|
@@ -5,6 +5,7 @@ import cn.seecoder.seecoderportalserver.utility.OkResponse;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@RestController
|
|
|
@@ -14,8 +15,8 @@ public class EvalController {
|
|
|
|
|
|
public EvalController(EvalService evalService) {this.evalService = evalService;}
|
|
|
|
|
|
- @GetMapping
|
|
|
- public OkResponse<JSONObject> getAllExams() {
|
|
|
- return OkResponse.of((JSONObject) evalService.getAllExams(100, 1).get("result"));
|
|
|
+ @GetMapping("/exams")
|
|
|
+ public OkResponse<JSONObject> getAllExams(@RequestParam(defaultValue = "100") int pageSize, @RequestParam(defaultValue = "1") int pageNum) {
|
|
|
+ return OkResponse.of((JSONObject) evalService.getAllExams(pageSize, pageNum).get("result"));
|
|
|
}
|
|
|
}
|