Browse Source

推广商品查询平台上架状态过滤业务处理

multiwx
dy-hu 7 months ago
parent
commit
ea0b6ed9b8
  1. 2
      cereshop-app/src/main/java/com/shop/cereshop/app/controller/distributor/DistributorController.java
  2. 8
      cereshop-app/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml

2
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<Page<Product>> getExtensionProduct(ShopParam param) throws CoBusinessException{
param.setProject(ContextUtil.getProject());
Page page= cerePlatformShopservice.getExtensionProduct(param);
return new Result(page,CoReturnFormat.SUCCESS);
}

8
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
<if test="project == 0">
and a.plat_shelve_state=1
</if>
<if test="project!=0 and project != ''">
and a.shelve_state=1
</if>
GROUP BY a.product_id
ORDER BY a.update_time DESC,a.create_time DESC
</select>

Loading…
Cancel
Save