龚焕茏
2024-05-07 49429bad1036c81c056faeadfa009c53ba777fad
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;
@@ -46,9 +47,8 @@
    @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 +85,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 +97,6 @@
        examPaperUser.setDeleted("0");
        examPaperUserService.add(examPaperUser);
        ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId());
        return RestResponse.ok(newVM);
        return RestResponse.ok(examPaperService.examPaperToVM(examPaper.getId()));
    }
}