‘linchangsheng’ 1 month ago
parent
commit
504d4e0591

+ 1 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/es/EsLogic.java

@@ -51,7 +51,7 @@ public class EsLogic {
             must.must(QueryBuilders.termQuery("comListId", comId));
         }
         if(StringUtils.isNotEmpty(workerNumber)){
-            must.must(QueryBuilders.termQuery("workerNumber", workerNumber));
+            must.must(QueryBuilders.termQuery("workerNumber.keyword", workerNumber));
         }
 /*        if(CollectionUtils.isNotEmpty(websitNumbers)){
             must.must(QueryBuilders.termsQuery("websitNumber.keyword",websitNumbers));

+ 2 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/es/EsLogic.java

@@ -50,13 +50,14 @@ public class EsLogic {
             CommonUtils.initList2(rows,rows.size());
             List<Object> row = (List<Object>) rows.get(i);
             String workerNumber = (String)row.get(0);
+            String websitNumber = (String)row.get(1);
             if(StringUtils.isEmpty(workerNumber)){
                 break;
             }
             CommonListES commonListES = new CommonListES();
             commonListES.setType(i==0?"1":"2");
             commonListES.setWorkerNumber(workerNumber);
-            commonListES.setWebsitNumber(workerNumber);
+            commonListES.setWebsitNumber(websitNumber);
             commonListES.setComListId(comListId);
             
             for(int x = start;x <= row.size();x++) {