Browse Source

客户基本信息修改只改客户名和logo

dev_shibei_match
zhaoqifeng 5 years ago
parent
commit
4a137da223
  1. 16
      epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerFormDTO.java
  2. 42
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

16
epmet-module/oper-crm/oper-crm-client/src/main/java/com/epmet/dto/form/UpdateCustomerFormDTO.java

@ -27,12 +27,12 @@ public class UpdateCustomerFormDTO implements Serializable {
* logo
*/
private String logo;
/**
* 根管理员姓名
*/
private String rootManageName;
/**
* 根管理员电话
*/
private String rootManagePhone;
// /**
// * 根管理员姓名
// */
// private String rootManageName;
// /**
// * 根管理员电话
// */
// private String rootManagePhone;
}

42
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -630,27 +630,27 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
}
entity.setLogo(formDTO.getLogo());
baseDao.updateById(entity);
if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) {
// 根级组织
Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId());
if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) {
throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString()));
}
CustomerAgencyDTO agency = customerRootAgencyRst.getData();
UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO();
updateRootManageFormDTO.setOrgId(agency.getId());
updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
if (StringUtils.isNotBlank(formDTO.getRootManageName())){
updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName());
}
if (StringUtils.isNotBlank(formDTO.getRootManageName())){
updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone());
}
Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO);
if (!rootManageResult.success()) {
throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString()));
}
}
// if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) {
// // 根级组织
// Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId());
// if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) {
// throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString()));
// }
// CustomerAgencyDTO agency = customerRootAgencyRst.getData();
// UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO();
// updateRootManageFormDTO.setOrgId(agency.getId());
// updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
// if (StringUtils.isNotBlank(formDTO.getRootManageName())){
// updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName());
// }
// if (StringUtils.isNotBlank(formDTO.getRootManageName())){
// updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone());
// }
// Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO);
// if (!rootManageResult.success()) {
// throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString()));
// }
// }
}
/**

Loading…
Cancel
Save