|
|
|
|
@ -54,7 +54,8 @@ public class DictBizCache { |
|
|
|
|
* @return DictBiz |
|
|
|
|
*/ |
|
|
|
|
public static DictBiz getById(Long id) { |
|
|
|
|
String keyPrefix = DICT_ID.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
|
|
|
|
// String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
|
|
|
String keyPrefix = DICT_VALUE; |
|
|
|
|
return CacheUtil.get(DICT_CACHE, keyPrefix, id, () -> dictService.getById(id), BusinessConstant.TENANT_MODE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -77,7 +78,8 @@ public class DictBizCache { |
|
|
|
|
* @return String |
|
|
|
|
*/ |
|
|
|
|
public static String getValue(String code, Integer dictKey) { |
|
|
|
|
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
|
|
|
|
// String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
|
|
|
String keyPrefix = DICT_VALUE; |
|
|
|
|
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, String.valueOf(dictKey), () -> dictService.getValue(code, String.valueOf(dictKey)), BusinessConstant.TENANT_MODE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -100,7 +102,8 @@ public class DictBizCache { |
|
|
|
|
* @return String |
|
|
|
|
*/ |
|
|
|
|
public static String getValue(String code, String dictKey) { |
|
|
|
|
String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
|
|
|
|
// String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
|
|
|
String keyPrefix = DICT_VALUE; |
|
|
|
|
return CacheUtil.get(DICT_CACHE, keyPrefix + code + StringPool.COLON, dictKey, () -> dictService.getValue(code, dictKey), BusinessConstant.TENANT_MODE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -111,7 +114,8 @@ public class DictBizCache { |
|
|
|
|
* @return List<DictBiz> |
|
|
|
|
*/ |
|
|
|
|
public static List<DictBiz> getList(String code) { |
|
|
|
|
String keyPrefix = DICT_LIST.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON); |
|
|
|
|
// String keyPrefix = DICT_VALUE.concat(StringPool.DASH).concat(AuthUtil.getTenantId()).concat(StringPool.COLON);
|
|
|
|
|
String keyPrefix = DICT_VALUE; |
|
|
|
|
return CacheUtil.get(DICT_CACHE, keyPrefix, code, () -> dictService.getList(code), BusinessConstant.TENANT_MODE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|