Commit 3635fa7f authored by suhuiguang's avatar suhuiguang

fix(大编辑):bug修复

1.json字段比较优化,null比较处理
parent c500fa09
...@@ -735,6 +735,9 @@ public class CommonEquipDataProcessService { ...@@ -735,6 +735,9 @@ public class CommonEquipDataProcessService {
} else if (newVal instanceof Boolean) { } else if (newVal instanceof Boolean) {
fieldChangeMeta.setColumnOldValue(Boolean.toString((Boolean) oldVal)); fieldChangeMeta.setColumnOldValue(Boolean.toString((Boolean) oldVal));
fieldChangeMeta.setColumnNewValue(Boolean.toString((Boolean) newVal)); fieldChangeMeta.setColumnNewValue(Boolean.toString((Boolean) newVal));
} else {
fieldChangeMeta.setColumnOldValue(Objects.toString(oldVal , null));
fieldChangeMeta.setColumnNewValue(Objects.toString(newVal, null));
} }
fieldChangeMeta.setDisplayOldValue(formatService.format(displayDefine, fieldChangeMeta.getColumnOldValue())); fieldChangeMeta.setDisplayOldValue(formatService.format(displayDefine, fieldChangeMeta.getColumnOldValue()));
fieldChangeMeta.setDisplayNewValue(formatService.format(displayDefine, fieldChangeMeta.getColumnNewValue())); fieldChangeMeta.setDisplayNewValue(formatService.format(displayDefine, fieldChangeMeta.getColumnNewValue()));
......
...@@ -115,7 +115,7 @@ public class JsonDiffUtil { ...@@ -115,7 +115,7 @@ public class JsonDiffUtil {
} }
private static boolean isNullOrEmpty(String str) { private static boolean isNullOrEmpty(String str) {
return str == null || str.trim().isEmpty(); return str == null || str.trim().isEmpty() || "null".equals(str);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment