Browse Source

updateTimeFill

master
wangchao 5 years ago
parent
commit
e63721dc5c
  1. 5
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java

5
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/handler/FieldMetaObjectHandler.java

@ -112,7 +112,10 @@ public class FieldMetaObjectHandler implements MetaObjectHandler {
updatedTime = metaObject.getValue(FieldConstant.UPDATED_TIME_HUMP); updatedTime = metaObject.getValue(FieldConstant.UPDATED_TIME_HUMP);
} }
if (updatedTime == null) { if (updatedTime == null) {
updatedTime = new Date(); if(metaObject.hasGetter(FieldConstant.CREATED_TIME_HUMP))
updatedTime = metaObject.getValue(FieldConstant.CREATED_TIME_HUMP);
if(updatedTime == null)
updatedTime = new Date();
} }
return updatedTime; return updatedTime;
} }

Loading…
Cancel
Save