Bladeren bron

调整redis取值

zhoutg 4 jaren geleden
bovenliggende
commit
945ed85f58

+ 0 - 5
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -1,19 +1,14 @@
 package com.diagbot.facade;
 
-import com.baomidou.mybatisplus.extension.api.R;
-import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.client.StandConvertServiceClient;
 import com.diagbot.dto.IndicationDTO;
-import com.diagbot.dto.RegularValueDTO;
 import com.diagbot.dto.WordCrfDTO;
-import com.diagbot.enums.RegularConfigEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.rule.CommonRule;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.IndicationPushVO;
-import com.diagbot.vo.RegularConfigDataVO;
 import com.diagbot.vo.StandConvert;
 import io.github.lvyahui8.spring.facade.DataFacade;
 import org.springframework.beans.factory.annotation.Autowired;

+ 5 - 3
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -1365,7 +1365,7 @@ public class NeoFacade {
         if (ListUtil.isNotEmpty(wordList)) {
             for (String s : wordList) {
                 String value = redisUtil.getWithString(type + "Conv:" + s);
-                if (StringUtil.isBlank(value)) {
+                if (value == null) {
                     StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
                     standConvertCrfVO.setWord_type(type);
                     standConvertCrfVO.setWord(s);
@@ -1431,7 +1431,8 @@ public class NeoFacade {
         // 将所有的词放入typeMap中
         for (String s : originList) {
             if (!typeMap.containsKey(s)) {
-                typeMap.put(s, s);
+                String value = redisUtil.getWithString(type + "Conv:" + s);
+                typeMap.put(s, value);
             }
         }
         map.put(type, typeMap);
@@ -1496,7 +1497,8 @@ public class NeoFacade {
         // 将所有的词放入typeMap中
         for (String s : originList) {
             if (!typeMap.containsKey(s)) {
-                typeMap.put(s, s);
+                String value = redisUtil.getWithString(type + "Conv:" + s);
+                typeMap.put(s, value);
             }
         }
         map.put(type, typeMap);