|
|
@ -162,7 +162,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
//判断用户是否存在
|
|
|
|
List<CustomerStaffDTO> customerStaffDTOList = baseDao.selectListCustomerStaffDTO(mobile); |
|
|
|
if (null == customerStaffDTOList || customerStaffDTOList.size() == 0) { |
|
|
|
logger.error(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", mobile, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); |
|
|
|
logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", mobile, EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); |
|
|
|
return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); |
|
|
|
} |
|
|
|
return new Result<List<CustomerStaffDTO>>().ok(customerStaffDTOList); |
|
|
@ -173,12 +173,12 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
public Result<CustomerStaffDTO> getCustomerStaffInfo(CustomerStaffFormDTO formDTO) { |
|
|
|
CustomerStaffDTO customerStaffDTO = baseDao.selectListCustomerStaffInfo(formDTO); |
|
|
|
if (null == customerStaffDTO) { |
|
|
|
logger.error(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); |
|
|
|
logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],code[%s],msg[%s]", formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); |
|
|
|
return new Result().error(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); |
|
|
|
} |
|
|
|
//判断用户是否已被禁用
|
|
|
|
if (null != customerStaffDTO && UserConstant.DISABLED.equals(customerStaffDTO.getEnableFlag())) { |
|
|
|
logger.error(String.format("根据手机号查询用户异常,手机号:[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), EpmetErrorCode.GOV_STAFF_DISABLED.getCode(), EpmetErrorCode.GOV_STAFF_DISABLED.getMsg())); |
|
|
|
logger.warn(String.format("根据手机号查询用户异常,手机号:[%s],客户id:[%s],code[%s],msg[%s]", formDTO.getMobile(), formDTO.getCustomerId(), EpmetErrorCode.GOV_STAFF_DISABLED.getCode(), EpmetErrorCode.GOV_STAFF_DISABLED.getMsg())); |
|
|
|
return new Result().error(EpmetErrorCode.GOV_STAFF_DISABLED.getCode()); |
|
|
|
} |
|
|
|
return new Result<CustomerStaffDTO>().ok(customerStaffDTO); |
|
|
@ -254,7 +254,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
//获取工作人员信息
|
|
|
|
CustomerStaffDTO customerStaffDTO = baseDao.selectStaffInfo(fromDTO); |
|
|
|
if (null == customerStaffDTO) { |
|
|
|
log.error("工作人员不存在"); |
|
|
|
log.warn("工作人员不存在"); |
|
|
|
} |
|
|
|
resultDTO.setStaffId(customerStaffDTO.getUserId()); |
|
|
|
resultDTO.setName(customerStaffDTO.getRealName()); |
|
|
@ -546,7 +546,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
//根据客户Id和手机号查询工作人员信息
|
|
|
|
List<CustomerStaffDTO> customerStaffDTOList = baseDao.selectStaff(formDTO); |
|
|
|
if (null == customerStaffDTOList || customerStaffDTOList.size() < NumConstant.ONE) { |
|
|
|
logger.error(String.format("根据客户Id和手机号查询用户异常,客户Id:[%s],手机号:[%s],code[%s],msg[%s]", |
|
|
|
logger.warn(String.format("根据客户Id和手机号查询用户异常,客户Id:[%s],手机号:[%s],code[%s],msg[%s]", |
|
|
|
formDTO.getCustomerId(), formDTO.getMobile(), EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode(), |
|
|
|
EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getMsg())); |
|
|
|
throw new RenException(EpmetErrorCode.GOV_STAFF_NOT_EXISTS.getCode()); |
|
|
@ -655,7 +655,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
customerDTO.setId(staffDTO.getCustomerId()); |
|
|
|
Result<CustomerDTO> customerInfo = operCrmOpenFeignClient.getCustomerInfo(customerDTO); |
|
|
|
if (!customerInfo.success()) { |
|
|
|
logger.error(String.format("获取客户信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); |
|
|
|
logger.warn(String.format("获取客户信息失败,调用%s服务查询客户名称失败,入参%s", ServiceConstant.OPER_CRM_SERVER, JSON.toJSONString(staffDTO.getCustomerId()))); |
|
|
|
} else { |
|
|
|
if (null != customerInfo.getData()){ |
|
|
|
CustomerListResultDTO resultDTO = new CustomerListResultDTO(); |
|
|
|