Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
3b85a0801d
|
@ -124,7 +124,8 @@ public class BeanUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e){
|
catch (Exception e){
|
||||||
log.warn("对象转换异常, class: {}, error: {}", clazz.getName(), e.getMessage());
|
log.error("对象转换异常, class: {}, error: {}", clazz.getName(), e);
|
||||||
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
~~~
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue