指令完成时判断是否取消
This commit is contained in:
@@ -758,7 +758,10 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finish(String id) {
|
||||
InstructionDto entity = this.findById(id);
|
||||
// if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
if (ObjectUtil.isEmpty(entity)||"3".equals(entity.getInstruction_status())) {
|
||||
log.error("指令{}被删除或无权限,操作失败!",id);
|
||||
return;
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
entity.setUpdate_time(now);
|
||||
|
||||
Reference in New Issue
Block a user