zhijiezhao 3 月之前
父節點
當前提交
f46b51e721
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/main/java/com/caimei365/commodity/service/impl/SearchProductServiceImpl.java

+ 3 - 1
src/main/java/com/caimei365/commodity/service/impl/SearchProductServiceImpl.java

@@ -98,7 +98,9 @@ public class SearchProductServiceImpl implements SearchProductService {
              * 用法参考文档https://help.aliyun.com/zh/open-search/industry-algorithm-edition/in-and-notin?spm=a2c4g.11186623.0.0.6fe44bdfKhFWxG
              */
             String productIds = searchMapper.findServiceProductIds(serviceProviderId);
-            filterList.add("in(p_id,\"" + productIds + "\")");
+            if (StringUtils.isNotBlank(productIds)) {
+                filterList.add("in(p_id,\"" + productIds + "\")");
+            }
         }
         if (!StringUtils.isEmpty(brandIds) && !"null".equals(brandIds)) {
             StringBuffer brandBuilder = new StringBuffer();