| | |
| | | import org.springblade.modules.apply.vo.ApplyPaPerVO; |
| | | import org.springblade.modules.apply.vo.ApplyVO; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.entity.ExamScore; |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final IUserService userService; |
| | | |
| | | private final ExamScoreService examScoreService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateApplyStatus") |
| | | public void updateApplyStatus(@RequestBody ApplyVO apply){ |
| | | public ExamScore updateApplyStatus(@RequestBody ApplyVO apply){ |
| | | applyService.updateApplyStatus(apply); |
| | | //新增考试成绩,没有成绩数据,待提交答题后更新数据 |
| | | ExamScore examScore = new ExamScore(); |
| | | examScore.setExamId(apply.getExamId().toString()); |
| | | examScore.setUserId(apply.getUserId().toString()); |
| | | examScore.setExamTime(new Date()); |
| | | //新增 |
| | | examScoreService.save(examScore); |
| | | return examScore; |
| | | } |
| | | |
| | | |