大赛管理功能
This commit is contained in:
parent
7e227fb96b
commit
8446891ba5
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -324,12 +324,12 @@
|
|||
</update>
|
||||
<select id="recursiveFindTask" parameterType="arraylist" resultType="club.joylink.rtss.vo.race.RaceTaskDetailDTO">
|
||||
WITH RECURSIVE task as
|
||||
(select id,name,`desc`,content,standards,scene_id,score_rule_id, 0 as parent_id from racetr_task where id in
|
||||
(select id,name,`desc`,content,standards,scene_id,score_rule_id as ruleId, 0 as parent_id from racetr_task where id in
|
||||
<foreach collection="taskIds" item="d" separator="," open="(" close=")">
|
||||
#{d}
|
||||
</foreach>
|
||||
UNION all
|
||||
select A.id,A.name,A.desc,A.content,A.standards,A.score_rule_id,A.score_rule_id,A.parent_id from racetr_task A, task B where A.parent_id = B.id)
|
||||
select A.id,A.name,A.desc,A.content,A.standards,A.score_rule_id,A.score_rule_id as ruleId,A.parent_id from racetr_task A, task B where A.parent_id = B.id)
|
||||
select * from task
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue