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);
                     }
                 }
             }