|
@@ -3,6 +3,7 @@ package cn.rankin.productservice.service;
|
|
|
import cn.rankin.common.utils.api.model.APIResult;
|
|
|
import cn.rankin.common.utils.api.page.Page;
|
|
|
import cn.rankin.common.utils.enums.BaseOrderEnum;
|
|
|
+import cn.rankin.common.utils.enums.BaseStatusEnum;
|
|
|
import cn.rankin.common.utils.enums.ProductTypeEnum;
|
|
|
import cn.rankin.common.utils.util.BeanUtil;
|
|
|
import cn.rankin.common.utils.util.JpaSortUtil;
|
|
@@ -162,8 +163,8 @@ public class ProductService {
|
|
|
for(PackageProductRelation rel : currentRelationList){
|
|
|
//skip pid not belong merchant
|
|
|
String pkgId = rel.getPkgId();
|
|
|
- if(null == pkgId || null == merchantProductRepository.findByPidAndMerchantId(pkgId, merchantId)){
|
|
|
- log.info("Skip, pkgId not Belong Merchant, pkgId={}, merchantId={}", pkgId, merchantId);
|
|
|
+ if(null == pkgId || null == merchantProductRepository.findByPidAndMerchantIdAndStatus(pkgId, merchantId, BaseStatusEnum.NORMAL)){
|
|
|
+ log.info("Skip, pkgId not Belong Merchant Or Not on Sale, pkgId={}, merchantId={}", pkgId, merchantId);
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -175,7 +176,7 @@ public class ProductService {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
- List<Product> pkgs = productRepository.findByPids(pids);
|
|
|
+ List<Product> pkgs = productRepository.findByPidsAndStatus(pids, BaseStatusEnum.NORMAL);
|
|
|
|
|
|
if (null == pkgs){
|
|
|
pkgs = new ArrayList<>();
|