Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
JerryMa1024 2020-07-14 21:12:18 +08:00
commit 3b85a0801d
2 changed files with 13 additions and 2 deletions

View File

@ -124,7 +124,8 @@ public class BeanUtils {
}
}
catch (Exception e){
log.warn("对象转换异常, class: {}, error: {}", clazz.getName(), e.getMessage());
log.error("对象转换异常, class: {}, error: {}", clazz.getName(), e);
return Collections.emptyList();
}
return resultList;
}

View File

@ -176,6 +176,16 @@ public class BaseCustomServiceImpl<M extends BaseCrudMapper<T>, T> extends BaseS
}
}
~~~
## 如何解决数据库无法自动设置更新时间?
* 通过Mybatis-plus的MetaObjectHandler接口自动填充示例
~~~java
@Component
public class FillMetaObjectHandler implements MetaObjectHandler {
@Override
public void updateFill(MetaObject metaObject) {
this.setFieldValByName(Cons.FieldName.updateTime.name(), new Date(), metaObject);
}
}
~~~