Commit 6fc4f7b8 authored by zhengyi's avatar zhengyi

补充客户详情2的返回值

parent c61dd7b2
......@@ -489,7 +489,17 @@ public class CustomerController {
if (Objects.isNull(respVO)) {
throw exception(CUSTOMER_NOT_EXISTS);
}
if (CollectionUtil.isNotEmpty(respVO.getProductList())) {
// 对商品数据进行分组返回
Map<Long, List<ProductRespVO>> productRespVOMap = respVO.getProductList().stream().collect(Collectors.groupingBy(ProductRespVO::getTypeId));
List<CustomerProductTypeGroupVO> products = productRespVOMap.entrySet().stream().map(entry -> {
CustomerProductTypeGroupVO productTypeGroupVO = new CustomerProductTypeGroupVO();
productTypeGroupVO.setTypeId(entry.getKey());
productTypeGroupVO.setProductIds(entry.getValue().stream().map(ProductRespVO::getId).collect(Collectors.toList()));
return productTypeGroupVO;
}).collect(Collectors.toList());
respVO.setProducts(products);
}
Long founder = respVO.getFounder();
if (founder != null) {
if (Boolean.TRUE.equals(respVO.getIsWebOrderConsigneeSync())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment