|
|
@@ -4,10 +4,10 @@ import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
import cn.hutool.core.util.ArrayUtil; |
|
|
|
import cn.hutool.core.util.ClassUtil; |
|
|
|
import cn.hutool.core.util.ObjUtil; |
|
|
|
import lombok.Builder; |
|
|
|
import lombok.Data; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
@@ -95,8 +95,7 @@ public final class ProjectDetailDiffUtil { |
|
|
|
Class<?> clazz = oldVal == null ? newVal.getClass() : oldVal.getClass(); |
|
|
|
oldVal = formatDate(MapUtil.get(oldObjMap, key, clazz)); |
|
|
|
newVal = formatDate(MapUtil.get(newObjMap, key, clazz)); |
|
|
|
// 如果是嵌套对象,则递归比较 |
|
|
|
if (!BeanUtil.isBean(clazz) && ObjUtil.notEqual(oldVal, newVal)) { |
|
|
|
if (ClassUtil.isSimpleValueType(clazz) && ObjUtil.notEqual(oldVal, newVal)) { |
|
|
|
result.add(FieldDiff.builder() |
|
|
|
.fieldName(key) |
|
|
|
.fieldType(clazz.getTypeName()) |
|
|
|