Commit c61dd7b2 authored by zhengyi's avatar zhengyi

修改客户新增/编辑/详情,客户主营类别/主营产品的传参与返参数据结构

parent 83933bf7
......@@ -169,9 +169,9 @@ public class CustomerController {
createReqVO.setIsPotential(true);
createReqVO.setCustomerOperateLogRemark("新增潜在客户");
if (CollectionUtil.isNotEmpty(createReqVO.getProducts())){
createReqVO.setProductTypes(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).collect(Collectors.joining(",")));
createReqVO.setProductTypes(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
createReqVO.setProductIds(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getProductIds)
.flatMap(Collection::stream).filter(Objects::nonNull).collect(Collectors.joining(",")));
.flatMap(Collection::stream).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
}
return createCustomerPrivate(createReqVO);
}
......@@ -185,9 +185,9 @@ public class CustomerController {
HttpServletRequest request) {
createReqVO.setCustomerOperateLogRemark("管理端页面新建客户");
if (CollectionUtil.isNotEmpty(createReqVO.getProducts())){
createReqVO.setProductTypes(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).collect(Collectors.joining(",")));
createReqVO.setProductTypes(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).map(String::valueOf).map(String::valueOf).collect(Collectors.joining(",")));
createReqVO.setProductIds(createReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getProductIds)
.flatMap(Collection::stream).filter(Objects::nonNull).collect(Collectors.joining(",")));
.flatMap(Collection::stream).filter(Objects::nonNull).map(String::valueOf).map(String::valueOf).collect(Collectors.joining(",")));
}
return createCustomerPrivate(createReqVO);
}
......@@ -261,9 +261,9 @@ public class CustomerController {
List<CustomerContactsUpdateReqVO> customerContacts =
updateReqVO.getCustomerContacts();
if (CollectionUtil.isNotEmpty(updateReqVO.getProducts())){
updateReqVO.setProductTypes(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).collect(Collectors.joining(",")));
updateReqVO.setProductTypes(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
updateReqVO.setProductIds(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getProductIds)
.flatMap(Collection::stream).filter(Objects::nonNull).collect(Collectors.joining(",")));
.flatMap(Collection::stream).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
}
if (!CollectionUtils.isEmpty(customerContacts)) {
long count = customerContacts.stream().filter(t -> CustomerContactsDefaultEnum.IS_DEFAULT.getValue().equals(t.getIsDefault())).count();
......@@ -354,9 +354,9 @@ public class CustomerController {
//完善信息要确认接收
updateReqVO.setIsCustomerServiceConfirmed(true);
if (CollectionUtil.isNotEmpty(updateReqVO.getProducts())){
updateReqVO.setProductTypes(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).collect(Collectors.joining(",")));
updateReqVO.setProductTypes(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getTypeId).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
updateReqVO.setProductIds(updateReqVO.getProducts().stream().map(CustomerProductTypeGroupVO::getProductIds)
.flatMap(Collection::stream).filter(Objects::nonNull).collect(Collectors.joining(",")));
.flatMap(Collection::stream).filter(Objects::nonNull).map(String::valueOf).collect(Collectors.joining(",")));
}
//完善客户信息确认接收时要计算客户的业绩类型
return this.updateCustomer(updateReqVO);
......
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