guozhaoshun пре 6 година
родитељ
комит
46e700d295

+ 1 - 1
rankin-product-service/src/main/java/cn/rankin/productservice/service/RecommendService.java

@@ -116,7 +116,7 @@ public class RecommendService {
         // 更新新加的
         List<String> notExistsRecommendIdList = ListUtil.subtract(productIdList, existRecommendIdList);
         if (notExistsRecommendIdList != null && notExistsRecommendIdList.size() > 0) {
-            List<MerchantProduct> merchantProductList = merchantProductRepository.findByPidIn(notExistsRecommendIdList);
+            List<MerchantProduct> merchantProductList = merchantProductRepository.findByPidsAndMerchantId(notExistsRecommendIdList,merchantId,BaseStatusEnum.NORMAL);
             Map<String, MerchantProduct> merchantProductMap = ListUtil.convert(merchantProductList, "pid", MerchantProduct.class);
             for (String productId : notExistsRecommendIdList) {
                 MerchantProduct merchantProduct = merchantProductMap.get(productId);