| | |
| | | return Result.ok(page); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/addPaper", method = RequestMethod.POST) |
| | | public Result taskExamPageList(@RequestBody @Validated(Add.class) ExamPaperForm form) { |
| | | if (!StringUtils.isBlank(form.getVisibility())) { |
| | |
| | | } |
| | | form.setCreateUser(getCurrentUser().getId()); |
| | | form.setCreateTime(new Date()); |
| | | examPaperService.addPaper(form); |
| | | return Result.ok(); |
| | | } |
| | | |
| | | return examPaperService.addPaper(form); |
| | | } |
| | | |
| | | @RequestMapping(value = "/edit", method = RequestMethod.POST) |
| | | public Result edit(@RequestBody @Validated(Update.class) ExamPaperForm form) { |
| | | if (!StringUtils.isBlank(form.getVisibility())) { |
| | | form.setVisibility(VisibilityEnum.fromCode(form.getVisibility()).getName()); |
| | | } |
| | | examPaperService.updateExamPaper(form); |
| | | return Result.ok(); |
| | | return examPaperService.updateExamPaper(form); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editQuestion", method = RequestMethod.POST) |