|
|
|
@ -318,15 +318,40 @@ public class CaseApi {
|
|
|
|
|
@ApiOperation("查询案例题步骤并排序")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdListAndSort(@RequestParam String threeId) {
|
|
|
|
|
return caseQuestionStepMapper.selectCaseStepListBatchByIdListAndSort(threeId);
|
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
|
example.createCriteria().andThreeIdEqualTo(threeId);
|
|
|
|
|
List<SysTopicAndCourse> topicAndCourseList = topicAndCourseMapper.selectByExample(example);
|
|
|
|
|
List<String> caseIdList = topicAndCourseList.stream().map(SysTopicAndCourse::getTopicId).collect(Collectors.toList());
|
|
|
|
|
SysCaseQuestionStepExample caseQuestionStepExample = new SysCaseQuestionStepExample();
|
|
|
|
|
caseQuestionStepExample.createCriteria().andCaseIdIn(caseIdList);
|
|
|
|
|
List<SysCaseQuestionStepWithBLOBs> sysCaseQuestionStepWithBLOBs = caseQuestionStepMapper.selectByExampleWithBLOBs(caseQuestionStepExample);
|
|
|
|
|
return sysCaseQuestionStepWithBLOBs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("selectCaseStepListBatchByIdListAndSortss")
|
|
|
|
|
@ApiOperation("查询案例题步骤并排序")
|
|
|
|
|
@PostMapping("selectCaseStepListBatchByIdList")
|
|
|
|
|
@ApiOperation("查询案例题步骤")
|
|
|
|
|
@AnonymousAccess
|
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdListAndSortss(@RequestBody List<String> list) {
|
|
|
|
|
return caseQuestionStepMapper.selectCaseStepListBatchByIdListAndSortss(list);
|
|
|
|
|
public List<SysCaseQuestionStepWithBLOBs> selectCaseStepListBatchByIdList(@RequestBody List<String> list) {
|
|
|
|
|
SysTopicAndCourseExample example = new SysTopicAndCourseExample();
|
|
|
|
|
example.createCriteria().andThreeIdIn(list);
|
|
|
|
|
List<SysTopicAndCourse> topicAndCourseList = topicAndCourseMapper.selectByExample(example);
|
|
|
|
|
List<String> caseIdList = topicAndCourseList.stream().map(SysTopicAndCourse::getTopicId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
SysCaseQuestionStepExample caseQuestionStepExample = new SysCaseQuestionStepExample();
|
|
|
|
|
caseQuestionStepExample.createCriteria().andCaseIdIn(caseIdList);
|
|
|
|
|
List<SysCaseQuestionStepWithBLOBs> sysCaseQuestionStepWithBLOBs = caseQuestionStepMapper.selectByExampleWithBLOBs(caseQuestionStepExample);
|
|
|
|
|
for (SysTopicAndCourse sysTopicAndCourse : topicAndCourseList) {
|
|
|
|
|
for (SysCaseQuestionStepWithBLOBs sysCaseQuestionStepWithBLOB : sysCaseQuestionStepWithBLOBs) {
|
|
|
|
|
if (sysTopicAndCourse.getTopicId().equals(sysCaseQuestionStepWithBLOB.getCaseId())){
|
|
|
|
|
sysCaseQuestionStepWithBLOB.setThreeId(sysTopicAndCourse.getThreeId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return sysCaseQuestionStepWithBLOBs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据章节IdList查询案例题
|
|
|
|
|
* 方法名:selectCaseByChapterIdList
|
|
|
|
|