|
@ -33,6 +33,7 @@ import com.epmet.dto.form.UserMessageFormDTO; |
|
|
import com.epmet.dto.form.UserResiInfoFormDTO; |
|
|
import com.epmet.dto.form.UserResiInfoFormDTO; |
|
|
import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; |
|
|
import com.epmet.dto.result.UserInfoOnEnterGridResultDTO; |
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
|
|
|
import com.epmet.dto.result.UserRoleResultDTO; |
|
|
import com.epmet.feign.MessageFeignClient; |
|
|
import com.epmet.feign.MessageFeignClient; |
|
|
import com.epmet.modules.constant.UserMessageConstant; |
|
|
import com.epmet.modules.constant.UserMessageConstant; |
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
@ -315,15 +316,21 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD |
|
|
userEnterGridFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
userEnterGridFormDTO.setCustomerId(resiGroupDTO.getCustomerId()); |
|
|
userEnterGridFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
userEnterGridFormDTO.setGridId(resiGroupDTO.getGridId()); |
|
|
Result<UserInfoOnEnterGridResultDTO> result=resiGuideFeignClient.enterGrid(userEnterGridFormDTO); |
|
|
Result<UserInfoOnEnterGridResultDTO> result=resiGuideFeignClient.enterGrid(userEnterGridFormDTO); |
|
|
if(!result.success()){ |
|
|
if (!result.success() || null == result.getData()) { |
|
|
logger.error(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】", |
|
|
logger.error(String.format("用户同意邀请进组,进入网格失败。入参:userId【%s】、invitationId【%s】、groupId【%s】、customerId【%s】、gridId【%s】", |
|
|
formDTO.getUserId(),formDTO.getInvitationId(), |
|
|
formDTO.getUserId(), formDTO.getInvitationId(), |
|
|
groupInvitationDTO.getResiGroupId()), |
|
|
groupInvitationDTO.getResiGroupId()), |
|
|
resiGroupDTO.getCustomerId(),resiGroupDTO.getGridId()); |
|
|
resiGroupDTO.getCustomerId(), resiGroupDTO.getGridId()); |
|
|
logger.error(String.format("用户同意邀请进组,进入网格失败。调用enterGrid接口返回",result.toString())); |
|
|
logger.error(String.format("用户同意邀请进组,进入网格失败。当前接口返回8000,调用enterGrid接口返回", result.toString())); |
|
|
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
} |
|
|
} |
|
|
//3、校验是否已经注册居民
|
|
|
//3、校验是否已经注册居民
|
|
|
UserRoleDTO userRoleDTO=new UserRoleDTO(); |
|
|
if(null==result.getData().getUserRoleList()||result.getData().getUserRoleList().size()==0){ |
|
|
|
|
|
logger.error(String.format("用户同意邀请进组失败,返回角色列表为空错误编码%s,错误提示%s",EpmetErrorCode.CANNOT_JOIN_GROUP.getCode(),EpmetErrorCode.CANNOT_JOIN_GROUP.getMsg())); |
|
|
|
|
|
throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode()); |
|
|
|
|
|
} |
|
|
|
|
|
UserRoleDTO userRoleDTO=this.getUserRoleDTO(result.getData().getUserRoleList()); |
|
|
|
|
|
/*UserRoleDTO userRoleDTO=new UserRoleDTO(); |
|
|
if (null != resiGroupDTO) { |
|
|
if (null != resiGroupDTO) { |
|
|
//获取当前用户所有角色
|
|
|
//获取当前用户所有角色
|
|
|
userRoleDTO = resiGroupService.checkPartyMemberOrWarmHeated(formDTO.getApp(), |
|
|
userRoleDTO = resiGroupService.checkPartyMemberOrWarmHeated(formDTO.getApp(), |
|
@ -334,7 +341,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD |
|
|
logger.error(String.format("居民端用户【%s】同意邀请进组失败,错误码:%s,错误提示:%s",formDTO.getUserId(),EpmetErrorCode.CANNOT_JOIN_GROUP.getCode(),EpmetErrorCode.CANNOT_JOIN_GROUP.getMsg())); |
|
|
logger.error(String.format("居民端用户【%s】同意邀请进组失败,错误码:%s,错误提示:%s",formDTO.getUserId(),EpmetErrorCode.CANNOT_JOIN_GROUP.getCode(),EpmetErrorCode.CANNOT_JOIN_GROUP.getMsg())); |
|
|
throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode()); |
|
|
throw new RenException(EpmetErrorCode.CANNOT_JOIN_GROUP.getCode()); |
|
|
} |
|
|
} |
|
|
} |
|
|
}*/ |
|
|
//3、新增一条邀请入群、直接审核通过的入群记录
|
|
|
//3、新增一条邀请入群、直接审核通过的入群记录
|
|
|
GroupMemeberOperationDTO groupMemeberOperation = new GroupMemeberOperationDTO(); |
|
|
GroupMemeberOperationDTO groupMemeberOperation = new GroupMemeberOperationDTO(); |
|
|
groupMemeberOperation.setGroupId(resiGroupDTO.getId()); |
|
|
groupMemeberOperation.setGroupId(resiGroupDTO.getId()); |
|
@ -363,6 +370,22 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD |
|
|
this.sendMessageToLeader(formDTO, resiGroupDTO,groupInvitationDTO); |
|
|
this.sendMessageToLeader(formDTO, resiGroupDTO,groupInvitationDTO); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private UserRoleDTO getUserRoleDTO(List<String> userRoleList) { |
|
|
|
|
|
UserRoleDTO userRoleDTO=new UserRoleDTO(); |
|
|
|
|
|
for (String roleKey : userRoleList) { |
|
|
|
|
|
if (EpmetRoleKeyConstant.PARTYMEMBER.equals(roleKey)) { |
|
|
|
|
|
userRoleDTO.setPartymemberFlag(NumConstant.ONE_STR); |
|
|
|
|
|
} |
|
|
|
|
|
if (EpmetRoleKeyConstant.WARMHEARTED.equals(roleKey)) { |
|
|
|
|
|
userRoleDTO.setWarmHeartedFlag(NumConstant.ONE_STR); |
|
|
|
|
|
} |
|
|
|
|
|
if (EpmetRoleKeyConstant.REGISTERED_RESI.equals(roleKey)) { |
|
|
|
|
|
userRoleDTO.setRegisteredResiFlag(NumConstant.ONE_STR); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return userRoleDTO; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param formDTO 当前用户信息 |
|
|
* @param formDTO 当前用户信息 |
|
|
* @param resiGroupDTO 群组信息 |
|
|
* @param resiGroupDTO 群组信息 |
|
|