diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/MineServiceImpl.java b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/MineServiceImpl.java index 4d9c0e30c8..77c8502971 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/MineServiceImpl.java +++ b/epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/MineServiceImpl.java @@ -46,7 +46,7 @@ public class MineServiceImpl implements MineService { public Result resetPassword(StaffResetPassWordFormDTO formDTO) { //1、两次填写的密码需要保持一致 if(!formDTO.getNewPassword().equals(formDTO.getConfirmNewPassword())){ - logger.error(String.format("两次填写的新密码不一致,新密码%s,确认新密码%s",formDTO.getNewPassword(),formDTO.getConfirmNewPassword())); + logger.warn(String.format("两次填写的新密码不一致,新密码%s,确认新密码%s",formDTO.getNewPassword(),formDTO.getConfirmNewPassword())); throw new RenException(EpmetErrorCode.PASSWORD_NOT_FIT.getCode()); } //2、校验密码规则:密码必须8-20个字符,而且同时包含大小写字母和数字 @@ -63,7 +63,7 @@ public class MineServiceImpl implements MineService { if(updatePassWordResult.success()){ logger.info(String.format("调用%s服务,修改密码成功", ServiceConstant.EPMET_USER_SERVER)); }else{ - logger.error(String.format("调用%s服务,修改密码失败,返参:%s", ServiceConstant.EPMET_USER_SERVER, + logger.warn(String.format("调用%s服务,修改密码失败,返参:%s", ServiceConstant.EPMET_USER_SERVER, JSON.toJSONString(updatePassWordResult))); return new Result().error(EpmetErrorCode.PASSWORD_UPDATE_FAILED.getCode()); } @@ -73,7 +73,7 @@ public class MineServiceImpl implements MineService { private boolean checkPassWord(String password) { boolean flag=false; if(password.length()<8||password.length()>20){ - logger.error(String.format("密码长度应为8-20位,当前输入密码%s,长度为%s",password,password.length())); + logger.warn(String.format("密码长度应为8-20位,当前输入密码%s,长度为%s",password,password.length())); return flag; } boolean numFlag=false; @@ -101,7 +101,7 @@ public class MineServiceImpl implements MineService { if(numFlag&&bigLetter&&smallLetter){ flag=true; }else{ - logger.error(String.format("当前密码%s,是否包含数字%s,是否包含大写字母%s,是否包含小写字母%s",password,numFlag,bigLetter,smallLetter)); + logger.warn(String.format("当前密码%s,是否包含数字%s,是否包含大写字母%s,是否包含小写字母%s",password,numFlag,bigLetter,smallLetter)); } return flag; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index 241f9d9a67..536cfdb330 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerDepartmentService; import com.epmet.service.CustomerGridService; import com.epmet.service.CustomerStaffAgencyService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -54,6 +55,7 @@ import java.util.Map; * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ +@Slf4j @Service public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl implements CustomerStaffAgencyService { @@ -146,7 +148,11 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl customerResult = operCrmFeignClient.getCustomerInfo(customerDTO); - resultDTO.setCustomerName(customerResult.getData().getCustomerName()); + if (customerResult.success() && null != customerResult.getData()) { + resultDTO.setCustomerName(customerResult.getData().getCustomerName()); + }else{ + log.warn(String.format("根据客户id:%s,查询客户信息失败",customerDTO.getId())); + } return new Result().ok(resultDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java index 1a063a83e4..ff722a6122 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java @@ -172,7 +172,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl 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>().ok(customerStaffDTOList); @@ -173,12 +173,12 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl 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().ok(customerStaffDTO); @@ -254,7 +254,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl 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 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();