public static Map<String, Object> mapDifferent(Map<String, Object> map, Map<String, Object>mapbefore){
Map<String, Object> mapbeforeAll = new HashMap<>();
if (!CommonUtils.isEmpty(map)) {
for (String key1 : map.keySet()) {
if (!CommonUtils.isEmpty(map.get(key1)) && !CommonUtils.isEmpty(mapbefore.get(key1))) {
String map1value = map.get(key1).toString();
String map2value = mapbefore.get(key1).toString();
if (!map1value.equals(map2value)) {
mapbeforeAll.put(key1, map2value);
}
}
}
}
return mapbeforeAll;
}
|