Commit 67afb888 authored by 赵啸非's avatar 赵啸非

修改日志记录

parent 114137f4
......@@ -365,6 +365,18 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
return super.editAfter(id, model, entity, context);
}
@Override
protected void saveBefore(DeviceEntity entity, Map<String, Object> model, Context context) throws AppException {
super.saveBefore(entity, model, context);
//判断如果存在相同的
DeviceEntity deviceEntity = this.service.selectOne(new DeviceQuery().deviceCode(entity.getDeviceCode()));
if(!ObjectUtils.isEmpty(deviceEntity)){
entity.setId(deviceEntity.getId());
}
}
public static void main(String[] args) {
String str2 = "510000000000".replaceAll("(0)+$", "");
System.out.println(str2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment