|
|
@ -55,7 +55,7 @@ public class CaseStepController {
|
|
|
|
@PostMapping("updateCase")
|
|
|
|
@PostMapping("updateCase")
|
|
|
|
public ResultEntity<HttpStatus> updateCase(@RequestBody SysCaseQuestionStepWithBLOBs caseQuestionStepWithBLOBs,
|
|
|
|
public ResultEntity<HttpStatus> updateCase(@RequestBody SysCaseQuestionStepWithBLOBs caseQuestionStepWithBLOBs,
|
|
|
|
@ApiParam("谁调的请求,传管理员/学校ID") @RequestParam String source) {
|
|
|
|
@ApiParam("谁调的请求,传管理员/学校ID") @RequestParam String source) {
|
|
|
|
List<SysTopicAndCourse> sysTopicAndCourses = getSysTopicAndCourses(caseQuestionStepWithBLOBs.getCaseId());
|
|
|
|
// List<SysTopicAndCourse> sysTopicAndCourses = getSysTopicAndCourses(caseQuestionStepWithBLOBs.getCaseId());
|
|
|
|
// if (!sysTopicAndCourses.isEmpty()) {
|
|
|
|
// if (!sysTopicAndCourses.isEmpty()) {
|
|
|
|
// return new ResultEntity<>(HttpStatus.BAD_REQUEST, "该案例题正在被使用!");
|
|
|
|
// return new ResultEntity<>(HttpStatus.BAD_REQUEST, "该案例题正在被使用!");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -63,7 +63,7 @@ public class CaseStepController {
|
|
|
|
//todo 管理员任意修改,老师只能改自己的
|
|
|
|
//todo 管理员任意修改,老师只能改自己的
|
|
|
|
SysCaseQuestion sysCaseQuestion = sysCaseQuestionMapper.selectByPrimaryKey(caseQuestionStepWithBLOBs.getCaseId());
|
|
|
|
SysCaseQuestion sysCaseQuestion = sysCaseQuestionMapper.selectByPrimaryKey(caseQuestionStepWithBLOBs.getCaseId());
|
|
|
|
if ("管理员".equals(source) || source.equals(sysCaseQuestion.getSource())) {
|
|
|
|
if ("管理员".equals(source) || source.equals(sysCaseQuestion.getSource())) {
|
|
|
|
caseQuestionStepMapper.updateByPrimaryKey(caseQuestionStepWithBLOBs);
|
|
|
|
caseQuestionStepMapper.updateByPrimaryKeyWithBLOBs(caseQuestionStepWithBLOBs);
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "编辑成功!");
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "编辑成功!");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "权限不足!");
|
|
|
|
return new ResultEntity<>(HttpStatus.BAD_REQUEST, "权限不足!");
|
|
|
|