|
|
@ -74,11 +74,22 @@ public class ExternalAppServiceImpl implements ExternalAppService { |
|
|
|
EpmetErrorCode.OPER_EXTERNAL_APP_EXISTS.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
if (externalCustomerDao.selectById(customerId) == null) { |
|
|
|
if (CustomerTypeEnum.EXTERNAL.getType().equals(customerType) && externalCustomerDao.selectById(customerId) == null) { |
|
|
|
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getCode(), |
|
|
|
EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
if (CustomerTypeEnum.INTERNAL.getType().equals(customerType)) { |
|
|
|
CustomerDTO form = new CustomerDTO(); |
|
|
|
form.setId(customerId); |
|
|
|
Result<CustomerDTO> customerInfoRst = operCrmOpenFeignClient.getCustomerInfo(form); |
|
|
|
if (customerInfoRst.success() && customerInfoRst.getData() == null) { |
|
|
|
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getCode(), |
|
|
|
EpmetErrorCode.OPER_EXTERNAL_CUSTOMER_NOT_EXISTS.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 应用表插入
|
|
|
|
ExternalAppEntity appEntity = new ExternalAppEntity(); |
|
|
|
appEntity.setAppName(appName); |
|
|
|