zhoutg 3 роки тому
батько
коміт
4e63ab258f
1 змінених файлів з 5 додано та 4 видалено
  1. 5 4
      src/main/java/com/diagbot/facade/CommonFacade.java

+ 5 - 4
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -527,12 +527,13 @@ public class CommonFacade {
             for (String s : wordList) {
                 String value = redisUtil.get(type + "Conv:" + s);
                 if (value == null) {
-                    StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
-                    standConvertCrfVO.setWord_type(type);
-                    standConvertCrfVO.setWord(s);
-                    standConvertCrfVOList.add(standConvertCrfVO);
+                    // 去重添加
                     if (!convertList.contains(s)) {
                         convertList.add(s);
+                        StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
+                        standConvertCrfVO.setWord_type(type);
+                        standConvertCrfVO.setWord(s);
+                        standConvertCrfVOList.add(standConvertCrfVO);
                     }
                 }
             }