From a13a93a493e7e94e28b2225c26e7e13b52d3288c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 12 Apr 2021 19:48:45 +0800
Subject: [PATCH] 20210412  tqq环境

---
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
index 16d5fb2..611820b 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
@@ -5,9 +5,9 @@
 import com.matrix.system.common.interceptor.HostInterceptor;
 import com.matrix.system.shopXcx.api.dto.SaleProductDto;
 import com.matrix.system.shopXcx.bean.ShopProduct;
-import com.matrix.system.shopXcx.bean.ShopProductAttribute;
 import com.matrix.system.shopXcx.dao.ShopProductAttributeDao;
 import com.matrix.system.shopXcx.dao.ShopProductDao;
+import com.matrix.system.shopXcx.dao.ShopSkuDao;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -36,6 +36,9 @@
     @Autowired
     private ShopProductAttributeDao shopProductAttributeDao;
 
+    @Autowired
+    private ShopSkuDao shopSkuDao;
+
     @ApiOperation(value = "查询推广商品", notes = "")
     @PostMapping(value = "/getSalesProductList")
     @ApiResponses({
@@ -43,15 +46,15 @@
     })
     public AjaxResult getShopProductShowList(@RequestBody @Validated SaleProductDto saleProductDto) {
         ShopProduct shopProduct=new ShopProduct();
-
-        ShopProductAttribute fxsc = shopProductAttributeDao.selectByCode("fxsc", HostInterceptor.getCompanyId());
         shopProduct.setLimit(saleProductDto.getPageSize());
         shopProduct.setOffset((saleProductDto.getPageNum()-1)* saleProductDto.getPageSize());
+        shopProduct.setCategoryId(saleProductDto.getCategoryId());
         shopProduct.setDelFlag(AppConstance.DATA_USEABLE);
         shopProduct.setStatus(AppConstance.IS_PUTAWAY);
+        shopProduct.setAbleSales(ShopProduct.ABLE_SALES);
         shopProduct.setCompanyId(HostInterceptor.getCompanyId());
-        shopProduct.setAttrs(fxsc.getAttrId()+"");
         List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct);
+        shopProducts.forEach(item->item.setSkus(shopSkuDao.selectByPid(item.getId())));
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, shopProducts);
         return result;
     }

--
Gitblit v1.9.1