diff --git a/src/main/java/club/joylink/rtss/controller/racetr/RacePaperController.java b/src/main/java/club/joylink/rtss/controller/racetr/RacePaperController.java index 87913420e..9153c3bf5 100644 --- a/src/main/java/club/joylink/rtss/controller/racetr/RacePaperController.java +++ b/src/main/java/club/joylink/rtss/controller/racetr/RacePaperController.java @@ -81,6 +81,5 @@ public class RacePaperController { public RacePaperSingleModuleGroupTask paperModuleTask(@PathVariable("paperId") Long id, @PathVariable("moduleId") Integer moduleId) { return this.racePaperService.singlePaperModuleTask(id, moduleId); -// return this.racePaperService.paperModuleTask(id, moduleId); } } diff --git a/src/main/java/club/joylink/rtss/services/race/RacePaperService.java b/src/main/java/club/joylink/rtss/services/race/RacePaperService.java index 5e00dfdac..3c003751d 100644 --- a/src/main/java/club/joylink/rtss/services/race/RacePaperService.java +++ b/src/main/java/club/joylink/rtss/services/race/RacePaperService.java @@ -178,6 +178,13 @@ public class RacePaperService { this.paperDAO.insert(paper); } + /** + * 试卷考试返回模块下所有的group,和任务,所有数据形成在一个"树" + * + * @param paperId + * @param moduleId + * @return + */ public RacePaperSingleModuleGroupTask singlePaperModuleTask(Long paperId, Integer moduleId) { BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(moduleId), "请选择对应的模型"); RacePaperDetailVO detailVO = this.detail(paperId); @@ -279,6 +286,13 @@ public class RacePaperService { cb.setContent(dto.getContent()); cb.setStandards(dto.getStandards()); cb.setParentId(dto.getParentId()); + if (Objects.nonNull(dto.getSceneId())) { + cb.setSceneId(dto.getSceneId()); + } + if (Objects.nonNull(dto.getRuleId())) { + cb.setRuleId(dto.getRuleId()); + + } } cb.setNodeType(nodeType); cb.setName(dto.getName()); diff --git a/src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml b/src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml index 023b68706..61f464b23 100644 --- a/src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml +++ b/src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml @@ -324,12 +324,12 @@ \ No newline at end of file