|
|
@@ -37,10 +37,10 @@ public class UpdateInspectionFileQuestionTypeService { |
|
|
|
* |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public JsonResult update(String id, Integer questionName) { |
|
|
|
public JsonResult update(String id, String questionCode) { |
|
|
|
log.info("进入修改任务问题类型业务接口"); |
|
|
|
String userId = CurrentUserUtil.getUserId(); |
|
|
|
JsonResult result = this.check(id, questionName); |
|
|
|
JsonResult result = this.check(id, questionCode); |
|
|
|
if (0 != result.getCode()) { |
|
|
|
log.info("修改任务问题类型业务接口:校验失败:{}", result.getMsg()); |
|
|
|
return result; |
|
|
@@ -63,15 +63,15 @@ public class UpdateInspectionFileQuestionTypeService { |
|
|
|
* 检查参数 |
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @param questionName |
|
|
|
* @param questionCode |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private JsonResult check(String id, Integer questionName) { |
|
|
|
private JsonResult check(String id, String questionCode) { |
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.ID_IS_NULL.getCode(), EditInspectionFileQuestionTypeCodeEnum.ID_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
if (ObjectUtil.isNull(questionName)) { |
|
|
|
if (ObjectUtil.isNull(questionCode)) { |
|
|
|
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.QUESTION_NAME_IS_NULL.getCode(), EditInspectionFileQuestionTypeCodeEnum.QUESTION_NAME_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
@@ -84,7 +84,7 @@ public class UpdateInspectionFileQuestionTypeService { |
|
|
|
} |
|
|
|
|
|
|
|
QuestionType questionType = questionTypeMapper.selectOne(Wrappers.<QuestionType>lambdaQuery() |
|
|
|
.eq(QuestionType::getName, questionName) |
|
|
|
.eq(QuestionType::getCode, questionCode) |
|
|
|
.eq(QuestionType::getMark, 1)); |
|
|
|
if (ObjectUtil.isNull(questionType)) { |
|
|
|
return JsonResult.error(EditInspectionFileQuestionTypeCodeEnum.QUESTION_TYPE_IS_NOT_EXIST.getCode(), EditInspectionFileQuestionTypeCodeEnum.QUESTION_TYPE_IS_NOT_EXIST.getMsg()); |