|
@@ -65,12 +65,27 @@ public class PaperController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "编辑试卷")
|
|
|
- @RequestMapping(value = "/update", method = RequestMethod.POST)
|
|
|
- public Result update(@RequestBody Paper paper) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("更新试卷参数")
|
|
|
+ @PostMapping("/updateParams")
|
|
|
+ public Result updateParams(Long pid, String name, String grade, String sectionNums,
|
|
|
+ String sectionDurations, String sectionRests, String remark) {
|
|
|
+ Paper paper = paperService.getOnePaper(pid);
|
|
|
+ paper.setName(name);
|
|
|
+ paper.setGrade(grade);
|
|
|
+ paper.setSectionNums(sectionNums);
|
|
|
+ paper.setSectionDurations(sectionDurations);
|
|
|
+ paper.setSectionRests(sectionRests);
|
|
|
+ paper.setRemark(remark);
|
|
|
return paperService.update(paper);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@PostMapping("/invalidate")
|
|
|
@ApiOperation(value = "作废试卷")
|
|
|
public Result invalidate(Long pid) {
|
|
@@ -80,7 +95,7 @@ public class PaperController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value = "删除试卷")
|
|
|
+ @ApiOperation(value = "删除试卷 假删除")
|
|
|
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
|
public void delete(@RequestParam Long id) {
|
|
|
paperService.delete(id);
|