|
@@ -1,9 +1,12 @@
|
|
|
package com.platform.dao.util.compare;
|
|
|
|
|
|
import com.platform.common.cache.DictCache;
|
|
|
+import com.platform.common.constant.UpmsRedisKeyConstants;
|
|
|
import com.platform.common.util.BeanUtils;
|
|
|
import com.platform.common.util.DateUtils;
|
|
|
+import com.platform.common.util.RedisUtils;
|
|
|
import com.platform.common.util.StringUtils;
|
|
|
+import com.platform.dao.entity.upms.SysDict;
|
|
|
import com.platform.dao.util.compare.annotation.FieldCompared;
|
|
|
|
|
|
import javax.persistence.Transient;
|
|
@@ -87,10 +90,11 @@ public class FieldComparedUtils {
|
|
|
String afterVal = "-";
|
|
|
// 根据type类型比较
|
|
|
if(fieldCompared.type() == 1){ // 数据字典
|
|
|
+ Map<Integer, SysDict> maps = RedisUtils.hget(UpmsRedisKeyConstants.DICT_OBJ_BY_VALUE, fieldCompared.value());
|
|
|
if(requestField != null){
|
|
|
- beforeVal = DictCache.getObjByValue(fieldCompared.value(), requestField);
|
|
|
+ beforeVal = maps.get(requestField).getLabel();
|
|
|
}
|
|
|
- afterVal = DictCache.getObjByValue(fieldCompared.value(), fitField);
|
|
|
+ afterVal = maps.get(fitField).getLabel();
|
|
|
} else if(fieldCompared.type() == 2){ // 通过ID查询
|
|
|
Object targetObj = BeanUtils.getBean(fieldCompared.value()); // mapper-Bean
|
|
|
Class cla = targetObj.getClass();
|