|
@@ -9,6 +9,7 @@ import com.diagbot.entity.TranHospitalInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.RedisEnum;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
+import com.diagbot.util.EntityUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.RedisUtil;
|
|
|
import org.apache.commons.collections4.map.LinkedMap;
|
|
@@ -125,20 +126,18 @@ public class CacheFacade {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- // public void loadVteAdviceCache(){
|
|
|
- // redisUtil.deleteByPrex(RedisEnum.vteAdvice.getName());
|
|
|
- // // 加载
|
|
|
- // List<DictionaryInfoDTO> dictionaryInfoDTOList = klDictionaryInfoFacade.getListByGroupType(100);
|
|
|
- // if (ListUtil.isNotEmpty(dictionaryInfoDTOList)) {
|
|
|
- // // 提示语
|
|
|
- // // EntityUtil.makeEntityListMap("", )
|
|
|
- // Map<String, Object> msgMap = new LinkedMap<>();
|
|
|
- // for (DictionaryInfoDTO dic : dictionaryInfoDTOList) {
|
|
|
- // msgMap.put(dic.getName(), dic.getVal());
|
|
|
- // }
|
|
|
- // redisUtil.putHashMap(RedisEnum.msg.getName(), msgMap);
|
|
|
- // }
|
|
|
- // }
|
|
|
+ public void loadVteAdviceCache(){
|
|
|
+ redisUtil.deleteByPrex(RedisEnum.vteAdvice.getName());
|
|
|
+ // 加载
|
|
|
+ List<DictionaryInfoDTO> dictionaryInfoDTOList = klDictionaryInfoFacade.getListByGroupType(100);
|
|
|
+ if (ListUtil.isNotEmpty(dictionaryInfoDTOList)) {
|
|
|
+ // 提示语
|
|
|
+ Map<String, List<DictionaryInfoDTO>> map = EntityUtil.makeEntityListMap(dictionaryInfoDTOList, "name");
|
|
|
+ for (String key : map.keySet()) {
|
|
|
+ redisUtil.set(RedisEnum.vteAdvice.getName() + "::" + key, map.get(key).stream().map(r -> r.getVal()).distinct().collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 重新加载大数据缓存
|