|
|
|
@ -9,6 +9,7 @@ import com.sztzjy.resource_center.mapper.SysCaseQuestionMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysCaseQuestionStepMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysOneCatalogMapper;
|
|
|
|
|
import com.sztzjy.resource_center.mapper.SysTopicAndCourseMapper;
|
|
|
|
|
import com.sztzjy.resource_center.util.PageUtil;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
@ -76,9 +77,11 @@ public class CaseApi {
|
|
|
|
|
sysTopicAndCourse.setOneName(sysCaseQuestion.getOneName());
|
|
|
|
|
if (StringUtils.isNotBlank(sysCaseQuestion.getTwoId())) {
|
|
|
|
|
sysTopicAndCourse.setTwoId(sysCaseQuestion.getTwoId());
|
|
|
|
|
sysTopicAndCourse.setTwoName(sysCaseQuestion.getTwoName());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(sysCaseQuestion.getThreeId())) {
|
|
|
|
|
sysTopicAndCourse.setThreeId(sysCaseQuestion.getThreeId());
|
|
|
|
|
sysTopicAndCourse.setThreeName(sysCaseQuestion.getThreeName());
|
|
|
|
|
}
|
|
|
|
|
topicAndCourseMapper.insert(sysTopicAndCourse);
|
|
|
|
|
return true;
|
|
|
|
@ -100,12 +103,11 @@ public class CaseApi {
|
|
|
|
|
@RequestParam(required = false) String keyword,
|
|
|
|
|
@RequestParam(required = false) String systemOwner,
|
|
|
|
|
@RequestParam(required = false) String schoolId) {
|
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
|
SysOneCatalog sysOneCatalogs = getSysOneCatalogs(systemOwner);
|
|
|
|
|
String oneId = sysOneCatalogs.getOneId();
|
|
|
|
|
List<SysCaseQuestion> list = caseQuestionMapper.selectCaseByConditions(keyword, oneId, schoolId);
|
|
|
|
|
PageInfo<SysCaseQuestion> pageInfo = new PageInfo<SysCaseQuestion>(list);
|
|
|
|
|
return pageInfo;
|
|
|
|
|
PageInfo pageInfo1 = PageUtil.pageHelper(list, index, size);
|
|
|
|
|
return pageInfo1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//案例题详情查询 caseId
|
|
|
|
@ -151,7 +153,7 @@ public class CaseApi {
|
|
|
|
|
@PostMapping("updateCase")
|
|
|
|
|
public Boolean updateCase(@RequestBody SysCaseQuestion sysCaseQuestion) {
|
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = getSysTopicAndCourses(sysCaseQuestion.getCaseId());
|
|
|
|
|
if (!sysTopicAndCourses.isEmpty()) {
|
|
|
|
|
if (sysTopicAndCourses.isEmpty()) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
caseQuestionMapper.updateByPrimaryKey(sysCaseQuestion);
|
|
|
|
|