diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/distributor/DistributorController.java b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/distributor/DistributorController.java index a2bd07d..2948244 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/distributor/DistributorController.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/distributor/DistributorController.java @@ -23,6 +23,7 @@ import com.shop.cereshop.app.service.distributor.CereShopDistributionLevelServic import com.shop.cereshop.app.service.distributor.CereShopDistributorService; import com.shop.cereshop.app.service.product.CereShopProductService; import com.shop.cereshop.app.service.shop.CerePlatformShopService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerWithdrawal; @@ -197,6 +198,7 @@ public class DistributorController { @GetMapping("getExtensionProduct") @ApiOperation(value = "推广商品查询") public Result> getExtensionProduct(ShopParam param) throws CoBusinessException{ + param.setProject(ContextUtil.getProject()); Page page= cerePlatformShopservice.getExtensionProduct(param); return new Result(page,CoReturnFormat.SUCCESS); } diff --git a/cereshop-app/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml index f687020..daac48a 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml @@ -363,7 +363,13 @@ LEFT JOIN cere_product_classify e ON a.classify_id=e.classify_id LEFT JOIN (SELECT SUM(a.number) number,a.sku_id,a.order_id from cere_order_product a, cere_shop_order b where a.order_id=b.order_id and b.state in (2,3,4) GROUP BY sku_id) f ON b.sku_id=f.sku_id - where a.shop_id=#{shopId} and a.shelve_state=1 and d.state=1 + where a.shop_id=#{shopId} and d.state=1 + + and a.plat_shelve_state=1 + + + and a.shelve_state=1 + GROUP BY a.product_id ORDER BY a.update_time DESC,a.create_time DESC