This commit is contained in:
2022-06-28 16:08:21 +08:00
41 changed files with 44 additions and 16 deletions

View File

@@ -205,8 +205,11 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
public Instruction findById(String instruction_id) {
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
JSONObject json = wo.query("instruction_id ='" + instruction_id + "'").uniqueResult(0);
final Instruction obj = json.toJavaObject(Instruction.class);
return obj;
if(ObjectUtil.isNotEmpty(json)){
final Instruction obj = json.toJavaObject(Instruction.class);
return obj;
}
return null;
}
@Override
@@ -634,9 +637,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
@Override
@Transactional(rollbackFor = Exception.class)
public void update(Instruction dto) {
Instruction entity = this.findById(dto.getInstruction_id());
//if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
String currentUsername = SecurityUtils.getCurrentUsername();
String now = DateUtil.now();
dto.setUpdate_time(now);