|
@@ -3,6 +3,7 @@ package cn.com.qmth.examcloud.service.examwork.api;
|
|
import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgTimeRepo;
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamOrgTimeRepo;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgTime;
|
|
import cn.com.qmth.examcloud.service.examwork.entity.ExamOrgTime;
|
|
|
|
+import cn.com.qmth.examcloud.service.examwork.service.ExamOrgTimeService;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
@@ -24,13 +25,16 @@ public class ExamOrgTimeApi {
|
|
@Autowired
|
|
@Autowired
|
|
ExamOrgTimeRepo examOrgTimeRepo;
|
|
ExamOrgTimeRepo examOrgTimeRepo;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ ExamOrgTimeService examOrgTimeService;
|
|
|
|
+
|
|
@ApiOperation(value="查询学习中心考试时间",notes = "分页")
|
|
@ApiOperation(value="查询学习中心考试时间",notes = "分页")
|
|
- @GetMapping("/examOrgTime/{examId}/{curPage}/{pageSize}")
|
|
|
|
- public ResponseEntity findByExamId(@PathVariable Long examId,
|
|
|
|
|
|
+ @GetMapping("/examOrgTime/{curPage}/{pageSize}")
|
|
|
|
+ public ResponseEntity findByExamId(@ModelAttribute ExamOrgTime examOrgTime,
|
|
@PathVariable Integer curPage,
|
|
@PathVariable Integer curPage,
|
|
@PathVariable Integer pageSize){
|
|
@PathVariable Integer pageSize){
|
|
PageRequest pageRequest = new PageRequest(curPage,pageSize);
|
|
PageRequest pageRequest = new PageRequest(curPage,pageSize);
|
|
- Page<ExamOrgTime> orgTimePage = examOrgTimeRepo.findByExamId(examId,pageRequest);
|
|
|
|
|
|
+ Page<ExamOrgTime> orgTimePage = examOrgTimeService.getAllOrgTime(examOrgTime,pageRequest);
|
|
return new ResponseEntity(orgTimePage, HttpStatus.OK);
|
|
return new ResponseEntity(orgTimePage, HttpStatus.OK);
|
|
}
|
|
}
|
|
|
|
|