xiaoyong931011
2021-04-12 a13a93a493e7e94e28b2225c26e7e13b52d3288c
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
@@ -5,7 +5,6 @@
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;
@@ -47,14 +46,13 @@
    })
    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);