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 * logo
*/ */
private String logo; private String logo;
/** // /**
* 根管理员姓名 // * 根管理员姓名
*/ // */
private String rootManageName; // private String rootManageName;
/** // /**
* 根管理员电话 // * 根管理员电话
*/ // */
private String rootManagePhone; // 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()); entity.setLogo(formDTO.getLogo());
baseDao.updateById(entity); baseDao.updateById(entity);
if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) { // if (StringUtils.isNotBlank(formDTO.getRootManageName()) || StringUtils.isNotBlank(formDTO.getRootManagePhone())) {
// 根级组织 // // 根级组织
Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId()); // Result<CustomerAgencyDTO> customerRootAgencyRst = govOrgFeignClient.getCustomerRootAgency(formDTO.getCustomerId());
if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) { // if (!customerRootAgencyRst.success() || null == customerRootAgencyRst.getData()) {
throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString())); // throw new RenException("客户基本信息修改:查询客户根级组织失败:".concat(customerRootAgencyRst.toString()));
} // }
CustomerAgencyDTO agency = customerRootAgencyRst.getData(); // CustomerAgencyDTO agency = customerRootAgencyRst.getData();
UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO(); // UpdateRootManageFormDTO updateRootManageFormDTO = new UpdateRootManageFormDTO();
updateRootManageFormDTO.setOrgId(agency.getId()); // updateRootManageFormDTO.setOrgId(agency.getId());
updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER); // updateRootManageFormDTO.setRoleKey(RoleKeyConstants.ROLE_KEY_ROOT_MANAGER);
if (StringUtils.isNotBlank(formDTO.getRootManageName())){ // if (StringUtils.isNotBlank(formDTO.getRootManageName())){
updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName()); // updateRootManageFormDTO.setRootManageName(formDTO.getRootManageName());
} // }
if (StringUtils.isNotBlank(formDTO.getRootManageName())){ // if (StringUtils.isNotBlank(formDTO.getRootManageName())){
updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone()); // updateRootManageFormDTO.setRootManagePhone(formDTO.getRootManagePhone());
} // }
Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO); // Result rootManageResult = epmetUserOpenFeignClient.updateRootManage(updateRootManageFormDTO);
if (!rootManageResult.success()) { // if (!rootManageResult.success()) {
throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString())); // throw new RenException("客户基本信息修改:修改根管理员信息失败:".concat(rootManageResult.toString()));
} // }
} // }
} }
/** /**

Loading…
Cancel
Save