Browse Source

updatecustomer先注释吧,不一定什么时候做

dev
yinzuomei 4 years ago
parent
commit
ff33e88e88
  1. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  2. 5
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java
  3. 2
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  4. 5
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -20,8 +20,8 @@ import java.util.Set;
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37 * @date 2020/6/4 13:37
*/ */
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092") // @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class, url = "localhost:8092")
// @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class) @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = GovOrgOpenFeignClientFallbackFactory.class)
public interface GovOrgOpenFeignClient { public interface GovOrgOpenFeignClient {
/** /**

5
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/controller/CustomerController.java

@ -316,11 +316,12 @@ public class CustomerController {
@PostMapping("updatecustomer") @PostMapping("updatecustomer")
public Result updateCustomer(@LoginUser TokenDto tokenDto,@RequestBody UpdateCustomerFormDTO formDTO) { public Result updateCustomer(@LoginUser TokenDto tokenDto,@RequestBody UpdateCustomerFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId()); formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,UpdateCustomerFormDTO.ShowGroup.class,UpdateCustomerFormDTO.AddUserInternalGroup.class); //确定好需求,再放开
/*ValidatorUtils.validateEntity(formDTO,UpdateCustomerFormDTO.ShowGroup.class,UpdateCustomerFormDTO.AddUserInternalGroup.class);
//如果开启了组织区划开关,根组织的组织区划变态男 //如果开启了组织区划开关,根组织的组织区划变态男
if("open".equals(formDTO.getAreaCodeSwitch())){ if("open".equals(formDTO.getAreaCodeSwitch())){
ValidatorUtils.validateEntity(formDTO,UpdateCustomerFormDTO.OpenAreaCodeSwitchGroup.class); ValidatorUtils.validateEntity(formDTO,UpdateCustomerFormDTO.OpenAreaCodeSwitchGroup.class);
} }*/
customerService.updateCustomer(formDTO); customerService.updateCustomer(formDTO);
return new Result(); return new Result();
} }

2
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -17,7 +17,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
//, url = "localhost:8092" //, url = "localhost:8092"
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class, url = "localhost:8092") @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class)
public interface GovOrgFeignClient { public interface GovOrgFeignClient {
/** /**

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

@ -700,11 +700,12 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
} }
//2、设置组织区划开关、根组织的组织区划 调用gov-org服务 //2、设置组织区划开关、根组织的组织区划 调用gov-org服务
CustomerAreaCodeFormDTO areaCodeFormDTO = ConvertUtils.sourceToTarget(formDTO, CustomerAreaCodeFormDTO.class); //确定好需求再放开
/*CustomerAreaCodeFormDTO areaCodeFormDTO = ConvertUtils.sourceToTarget(formDTO, CustomerAreaCodeFormDTO.class);
Result govOrgresult = govOrgOpenFeignClient.configCustomerAreaCode(areaCodeFormDTO); Result govOrgresult = govOrgOpenFeignClient.configCustomerAreaCode(areaCodeFormDTO);
if (!govOrgresult.success()) { if (!govOrgresult.success()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "gov-org服务异常:" + govOrgresult.getInternalMsg(), "设置组织区划接口返回异常:" + govOrgresult.getMsg()); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "gov-org服务异常:" + govOrgresult.getInternalMsg(), "设置组织区划接口返回异常:" + govOrgresult.getMsg());
} }*/
//3、修改客户名称 //3、修改客户名称
CustomerEntity entity = new CustomerEntity(); CustomerEntity entity = new CustomerEntity();

Loading…
Cancel
Save