jyy
2021-03-16 dd1867e7fb314ef68d782dbccafaf8190f8598b1
修改商品查询bug2
1 files modified
5 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java 5 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
@@ -8,6 +8,7 @@
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 +37,9 @@
    @Autowired
    private ShopProductAttributeDao shopProductAttributeDao;
    @Autowired
    private ShopSkuDao shopSkuDao;
    @ApiOperation(value = "查询推广商品", notes = "")
    @PostMapping(value = "/getSalesProductList")
    @ApiResponses({
@@ -52,6 +56,7 @@
        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;
    }