Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
ee2bc6359f
  1. 18
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java

18
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/invitation/service/impl/GroupInvitationServiceImpl.java

@ -328,11 +328,11 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
GroupInvitationDTO groupInvitationDTO = this.get(invitationId);
//Date1.after(Date2),当Date1大于Date2时,返回TRUE,当小于等于时,返回false;
if (null == groupInvitationDTO) {
logger.error(String.format("根据链接【%s】查看群邀请信息异常,错误码:%s,错误提示:%s",invitationId,EpmetErrorCode.LOSE_EFFICACY.getCode(), EpmetErrorCode.LOSE_EFFICACY.getMsg()));
logger.warn(String.format("根据链接【%s】查看群邀请信息异常,错误码:%s,错误提示:%s",invitationId,EpmetErrorCode.LOSE_EFFICACY.getCode(), EpmetErrorCode.LOSE_EFFICACY.getMsg()));
throw new RenException(EpmetErrorCode.LOSE_EFFICACY.getCode());
}
if (null != groupInvitationDTO && !groupInvitationDTO.getValidEndTime().after(new Date())) {
logger.error(String.format("根据链接【%s】查看群邀请信息异常,错误码:%s,错误提示:%s",invitationId,EpmetErrorCode.LOSE_EFFICACY.getCode(), EpmetErrorCode.LOSE_EFFICACY.getMsg()));
logger.warn(String.format("根据链接【%s】查看群邀请信息异常,错误码:%s,错误提示:%s",invitationId,EpmetErrorCode.LOSE_EFFICACY.getCode(), EpmetErrorCode.LOSE_EFFICACY.getMsg()));
throw new RenException(EpmetErrorCode.LOSE_EFFICACY.getCode());
}
/*ResiGroupEntity resiGroupEntity = resiGroupDao.selectById(groupInvitationDTO.getResiGroupId());
@ -369,7 +369,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//3、进入小组所在的网格
ResiGroupDTO resiGroupDTO = resiGroupService.get(groupInvitationDTO.getResiGroupId());
if(null==resiGroupDTO){
logger.error(String.format("用户同意邀请进组,查询组信息失败。入参:userId【%s】、invitationId【%s】、groupId【%s】。",formDTO.getUserId(),formDTO.getInvitationId(),groupInvitationDTO.getResiGroupId()));
logger.warn(String.format("用户同意邀请进组,查询组信息失败。入参:userId【%s】、invitationId【%s】、groupId【%s】。",formDTO.getUserId(),formDTO.getInvitationId(),groupInvitationDTO.getResiGroupId()));
throw new RenException(EpmetErrorCode.LOSE_EFFICACY.getCode());
}
UserEnterGridFormDTO userEnterGridFormDTO=new UserEnterGridFormDTO();
@ -377,11 +377,11 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
userEnterGridFormDTO.setGridId(resiGroupDTO.getGridId());
Result<UserInfoOnEnterGridResultDTO> result=resiGuideFeignClient.enterGrid(userEnterGridFormDTO);
if (!result.success() || null == result.getData()) {
logger.error(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】",
logger.warn(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】",
formDTO.getUserId(), formDTO.getInvitationId(),
groupInvitationDTO.getResiGroupId()),
resiGroupDTO.getCustomerId(), resiGroupDTO.getGridId());
logger.error(String.format("用户同意邀请进组,进入网格失败。当前接口返回8000,调用enterGrid接口返回", result.toString()));
logger.warn(String.format("用户同意邀请进组,进入网格失败。当前接口返回8000,调用enterGrid接口返回", result.toString()));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
}
//4、校验是否已经注册居民
@ -463,7 +463,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
//3、进入小组所在的网格
ResiGroupDTO resiGroupDTO = resiGroupService.get(groupInvitationDTO.getResiGroupId());
if(null==resiGroupDTO){
logger.error(String.format("用户同意邀请进组,查询组信息失败。入参:userId【%s】、invitationId【%s】、groupId【%s】。",formDTO.getUserId(),formDTO.getInvitationId(),groupInvitationDTO.getResiGroupId()));
logger.warn(String.format("用户同意邀请进组,查询组信息失败。入参:userId【%s】、invitationId【%s】、groupId【%s】。",formDTO.getUserId(),formDTO.getInvitationId(),groupInvitationDTO.getResiGroupId()));
throw new RenException(EpmetErrorCode.LOSE_EFFICACY.getCode());
}
UserEnterGridFormDTO userEnterGridFormDTO=new UserEnterGridFormDTO();
@ -471,11 +471,11 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
userEnterGridFormDTO.setGridId(resiGroupDTO.getGridId());
Result<UserInfoOnEnterGridResultDTO> result=resiGuideFeignClient.enterGrid(userEnterGridFormDTO);
if (!result.success() || null == result.getData()) {
logger.error(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】",
logger.warn(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】",
formDTO.getUserId(), formDTO.getInvitationId(),
groupInvitationDTO.getResiGroupId()),
resiGroupDTO.getCustomerId(), resiGroupDTO.getGridId());
logger.error(String.format("用户同意邀请进组,进入网格失败。当前接口返回8000,调用enterGrid接口返回", result.toString()));
logger.warn(String.format("用户同意邀请进组,进入网格失败。当前接口返回8000,调用enterGrid接口返回", result.toString()));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
}
//4、校验是否已经注册居民
@ -629,7 +629,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD
if (result.success()) {
logger.info("通知群主有新成员入群成功");
} else {
logger.error("通知群主有新成员入群失败" + result.getMsg());
logger.warn("通知群主有新成员入群失败" + result.getMsg());
}
return result;
}

Loading…
Cancel
Save