提交 24982ff2 作者: xiaowang

Merge branch 'develop'

......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: eebdf3dd0f1a02d80d325291be9ab36093d8f496
newTag: e00d10cefb341b9b5ab38a774728fa4c968bcaf2
......@@ -28,9 +28,9 @@ public class ProductReportController {
@ApiOperation(value = "获取用户报表数据")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductReportDTO.class)})
@GetMapping("/getUserReportData")
public ResultBody<ProductReportDTO> getUserReportData() {
return productReportService.getUserReportData();
@GetMapping("/getProductReportData")
public ResultBody<ProductReportDTO> getProductReportData() {
return productReportService.getProductReportData();
}
}
......@@ -83,7 +83,7 @@ public class MallGoodsDO implements Serializable {
private Integer imgId;
private List<MallGoodsDO> mallGoodsDOList;
private PriceStockDO priceStockDO;
private List<PriceStockDO> priceStockDOS;
public MallGoodsDO(MallGoodsVO mallGoodsVO) {
this.id = mallGoodsVO.getId();
......@@ -118,9 +118,7 @@ public class MallGoodsDO implements Serializable {
public UavCartDTO buildUavCartDTO() {
return UavCartDTO.builder().mallGoodsId(id).thirdBackUserAccountId(userAccountId).tradeName(tradeName)
.productSpec(priceStockDO.getProductSpec()).salePrice(priceStockDO.getSalePrice())
.skuImage(priceStockDO.getSkuImage() == null ? url : priceStockDO.getSkuImage())
.skuNo(priceStockDO.getSkuNo()).priceShow(priceShow).deleted(deleted).shelfStatus(shelfStatus).build();
.priceShow(priceShow).deleted(deleted).shelfStatus(shelfStatus).build();
}
}
......@@ -9,6 +9,6 @@ import com.mmc.pms.model.data.dto.ProductReportDTO;
* 概要:
*/
public interface ProductReportService {
ResultBody<ProductReportDTO> getUserReportData();
ResultBody<ProductReportDTO> getProductReportData();
}
......@@ -31,7 +31,7 @@ public class ProductReportServiceImpl implements ProductReportService {
ImsAppApi imsAppApi;
@Override
public ResultBody<ProductReportDTO> getUserReportData() {
public ResultBody<ProductReportDTO> getProductReportData() {
// 获取入驻商家总数
ProductReportDTO joinStoreNumber = userAppApi.getJoinStoreNumber();
// 获取销售商品个数
......
......@@ -3,12 +3,14 @@ package com.mmc.pms.service.mall.impl;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.mall.AppMallGoodsDao;
import com.mmc.pms.entity.mall.MallGoodsDO;
import com.mmc.pms.entity.mall.PriceStockDO;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.mall.UavCartDTO;
import com.mmc.pms.model.qo.mall.PriceStockQO;
import com.mmc.pms.service.mall.AppMallGoodsService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -69,6 +71,19 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
public List<UavCartDTO> listPriceStock(List<PriceStockQO> param) {
// 根据商品id和规格套装查询
List<MallGoodsDO> mallGoodsList = appMallGoodsDao.listPriceStock(param);
return mallGoodsList.stream().map(MallGoodsDO::buildUavCartDTO).collect(Collectors.toList());
List<UavCartDTO> uavCartDTOS = new ArrayList<UavCartDTO>();
for (MallGoodsDO mallGoodsDO : mallGoodsList) {
if (CollectionUtils.isNotEmpty(mallGoodsDO.getPriceStockDOS())) {
for (PriceStockDO priceStockDO : mallGoodsDO.getPriceStockDOS()) {
UavCartDTO uavCartDTO = mallGoodsDO.buildUavCartDTO();
uavCartDTO.setSkuImage(StringUtils.isBlank(priceStockDO.getSkuImage()) ? mallGoodsDO.getUrl() : priceStockDO.getSkuImage());
uavCartDTO.setProductSpec(priceStockDO.getProductSpec());
uavCartDTO.setSalePrice(priceStockDO.getSalePrice());
uavCartDTO.setSkuNo(priceStockDO.getSkuNo());
uavCartDTOS.add(uavCartDTO);
}
}
}
return uavCartDTOS;
}
}
......@@ -105,11 +105,9 @@
where id = #{id}
</update>
<update id="remove">
update company_inspection
set is_deleted = 1
where id = #{id}
</update>
<delete id="remove">
delete from company_inspection where id = #{id}
</delete>
<update id="updateRemark">
update company_inspection
......
......@@ -74,12 +74,13 @@
<result column="url" property="url"/>
<result column="is_deleted" property="deleted"/>
<result column="shelf_status" property="shelfStatus"/>
<association property="priceStockDO" javaType="com.mmc.pms.entity.mall.PriceStockDO">
<collection property="priceStockDOS" ofType="com.mmc.pms.entity.mall.PriceStockDO" >
<id column="productSpecId" property="id"/>
<result column="product_spec" property="productSpec"/>
<result column="sku_image" property="skuImage"/>
<result column="sale_price" property="salePrice"/>
<result column="sku_no" property="skuNo"/>
</association>
</collection>
</resultMap>
<select id="listPriceStock" resultMap="resultMallGoodsMap">
SELECT
......@@ -90,6 +91,7 @@
mg.is_deleted,
mg.shelf_status,
mgr.url url,
ps.id as productSpecId,
ps.product_spec,
ps.sale_price,
ps.sku_image,
......
......@@ -22,6 +22,7 @@ data-filter:
- /pms/category/appCategoryInfo
- /pms/app/goods/queryBrandGoods
- /pms/app/goods/queryGoodsInfoByCategorySub
- /pms/app/goods/listPriceStock
- /pms/mall/goods/feignRemoveGoodsByBackUserAccountId
- /pms/app/lease/leaseGoodsDetails
- /pms/app/lease/leaseGoodsList
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论