mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-31 08:14:18 +08:00
♻️ Refactoring code. 审计字段填充字段为NULL 不填充
This commit is contained in:
parent
39ab0b17f5
commit
a34a4e670c
@ -51,6 +51,11 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
|
|||||||
* @param isCover 是否覆盖原有值,避免更新操作手动入参
|
* @param isCover 是否覆盖原有值,避免更新操作手动入参
|
||||||
*/
|
*/
|
||||||
private static void fillValIfNullByName(String fieldName, Object fieldVal, MetaObject metaObject, boolean isCover) {
|
private static void fillValIfNullByName(String fieldName, Object fieldVal, MetaObject metaObject, boolean isCover) {
|
||||||
|
// 0. 如果填充值为空
|
||||||
|
if (fieldVal == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. 没有 set 方法
|
// 1. 没有 set 方法
|
||||||
if (!metaObject.hasSetter(fieldName)) {
|
if (!metaObject.hasSetter(fieldName)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user