Browse Source

机器人报警群日志降级、空指针修改

dev_shibei_match
yinzuomei 5 years ago
parent
commit
ed86f3f24d
  1. 8
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/service/impl/MineServiceImpl.java
  2. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  3. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java
  4. 12
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

8
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;
}

8
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<CustomerStaffAgencyDao, CustomerStaffAgencyEntity> implements CustomerStaffAgencyService {
@ -146,7 +148,11 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
CustomerDTO customerDTO = new CustomerDTO();
customerDTO.setId(customerStaffAgencyDTO.getCustomerId());
Result<CustomerDTO> 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<LatestCustomerResultDTO>().ok(resultDTO);
}

4
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<GroupInvitationD
//2、审核通过(讨论中)的群才可以分享邀请连接
ResiGroupDTO resiGroupDTO = resiGroupService.get(formDTO.getGroupId());
if (!GroupStateConstant.GROUP_APPROVED.equals(resiGroupDTO.getState())) {
logger.error(String.format("生成群成员链接失败,原因:%s",EpmetErrorCode.INVITE_NEW_MEMBER.getMsg()));
logger.warn(String.format("生成群成员链接失败,原因:%s",EpmetErrorCode.INVITE_NEW_MEMBER.getMsg()));
throw new RenException(EpmetErrorCode.INVITE_NEW_MEMBER.getCode());
}
//3、插入一条邀请记录
@ -205,7 +205,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//2、审核通过(讨论中)的群才可以分享邀请连接
ResiGroupDTO resiGroupDTO = resiGroupService.get(formDTO.getGroupId());
if (!GroupStateConstant.GROUP_APPROVED.equals(resiGroupDTO.getState())) {
logger.error(String.format("生成群成员链接失败,原因:%s",EpmetErrorCode.INVITE_NEW_MEMBER.getMsg()));
logger.warn(String.format("生成群成员链接失败,原因:%s",EpmetErrorCode.INVITE_NEW_MEMBER.getMsg()));
throw new RenException(EpmetErrorCode.INVITE_NEW_MEMBER.getCode());
}
//3、插入一条邀请记录

12
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -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();

Loading…
Cancel
Save