zhijiezhao 3 months ago
parent
commit
f46b51e721

+ 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
              * 用法参考文档https://help.aliyun.com/zh/open-search/industry-algorithm-edition/in-and-notin?spm=a2c4g.11186623.0.0.6fe44bdfKhFWxG
              */
              */
             String productIds = searchMapper.findServiceProductIds(serviceProviderId);
             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)) {
         if (!StringUtils.isEmpty(brandIds) && !"null".equals(brandIds)) {
             StringBuffer brandBuilder = new StringBuffer();
             StringBuffer brandBuilder = new StringBuffer();