This commit is contained in:
pengjie 2023-11-03 10:21:25 +08:00
parent d29f920833
commit e4c31f6e30
2 changed files with 7 additions and 4 deletions

View File

@ -68,7 +68,7 @@ public class InspectQuestionExamineController {
inspectQuestionExamine.setCreateTime(new Date()); inspectQuestionExamine.setCreateTime(new Date());
boolean ok = inspectQuestionExamineService.saveInfo(inspectQuestionExamine); boolean ok = inspectQuestionExamineService.saveInfo(inspectQuestionExamine);
if (ok) { if (ok) {
result.success("审批成功!"); result.success("操作成功!");
} else { } else {
result.success("操作失败!"); result.success("操作失败!");
} }

View File

@ -49,9 +49,12 @@ public class InspectQuestionExamineServiceImpl extends ServiceImpl<InspectQuesti
LambdaUpdateWrapper<InspectQuestion> wrapperQuestion = Wrappers.<InspectQuestion>lambdaUpdate(); LambdaUpdateWrapper<InspectQuestion> wrapperQuestion = Wrappers.<InspectQuestion>lambdaUpdate();
wrapperQuestion.set(InspectQuestion::getState, 2); wrapperQuestion.set(InspectQuestion::getState, 2);
wrapperQuestion.eq(InspectQuestion::getId, inspectQuestionExamine.getInspectQuestionId()); wrapperQuestion.eq(InspectQuestion::getId, inspectQuestionExamine.getInspectQuestionId());
inspectQuestionService.update(wrapperQuestion); boolean update = inspectQuestionService.update(wrapperQuestion);
updateState(inspectQuestionExamine); if (update) {
return this.save(inspectQuestionExamine); updateState(inspectQuestionExamine);
return this.save(inspectQuestionExamine);
}
return false;
} }
private void updateState(InspectQuestionExamine inspectQuestionExamine) { private void updateState(InspectQuestionExamine inspectQuestionExamine) {