xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
src/main/java/com/mindskip/xzs/controller/student/ExamPaperController.java
@@ -13,6 +13,7 @@
import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import com.github.pagehelper.PageInfo;
@@ -45,10 +46,15 @@
    }
    /**
     * 开始考试
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
    public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
        ExamPaperEditRequestVM vm = examPaperService.examPaperToVM(id);
        return RestResponse.ok(vm);
    public RestResponse<ExamPaperEditRequestVO> select(@PathVariable Integer id) {
        return RestResponse.ok(examPaperService.examPaperToVM(id));
    }
@@ -85,7 +91,7 @@
    }
    @RequestMapping(value = "/edit", method = RequestMethod.POST)
    public RestResponse<ExamPaperEditRequestVM> edit(@RequestBody @Valid ExamPaperEditRequestVM model) throws Exception {
    public RestResponse<ExamPaperEditRequestVO> edit(@RequestBody @Valid ExamPaperEditRequestVM model) throws Exception {
        ExamPaperUser examPaperUser = new ExamPaperUser();
        User user = getCurrentUser();
        model.setDepartmentIds(new Integer[0]);
@@ -97,8 +103,6 @@
        examPaperUser.setDeleted("0");
        examPaperUserService.add(examPaperUser);
        ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId());
        return RestResponse.ok(newVM);
        return RestResponse.ok(examPaperService.examPaperToVM(examPaper.getId()));
    }
}