From ea0b6ed9b80c4faffb85c6785b7e8245207607c0 Mon Sep 17 00:00:00 2001 From: dy-hu Date: Thu, 27 Jun 2024 14:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=95=86=E5=93=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=B9=B3=E5=8F=B0=E4=B8=8A=E6=9E=B6=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E4=B8=9A=E5=8A=A1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controller/distributor/DistributorController.java | 2 ++ .../main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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