|  |  | @ -155,20 +155,12 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD | 
			
		
	
		
			
				
					|  |  |  | 	 * @param formDTO | 
			
		
	
		
			
				
					|  |  |  | 	 * @return com.epmet.commons.tools.utils.Result<com.epmet.resi.group.dto.invitation.result.CreateGroupInvitationResultDTO> | 
			
		
	
		
			
				
					|  |  |  | 	 * @Author yinzuomei | 
			
		
	
		
			
				
					|  |  |  | 	 * @Description 生成邀请连接 | 
			
		
	
		
			
				
					|  |  |  | 	 * @Description 生成邀请群成员连接 | 
			
		
	
		
			
				
					|  |  |  | 	 * @Date 2020/3/31 22:50 | 
			
		
	
		
			
				
					|  |  |  | 	 **/ | 
			
		
	
		
			
				
					|  |  |  | 	@Override | 
			
		
	
		
			
				
					|  |  |  | 	public Result<CreateGroupInvitationResultDTO> createGroupInvitation(CreateGroupInvitationFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  | 		//1、只有群主可以邀请新成员
 | 
			
		
	
		
			
				
					|  |  |  | 		ResiGroupMemberDTO resiGroupMemberDTO = resiGroupMemberDao.selectGroupMemberInfo(formDTO.getGroupId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  | 		if (null == resiGroupMemberDTO) { | 
			
		
	
		
			
				
					|  |  |  | 			return new Result<>(); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		if (null != resiGroupMemberDTO && !LeaderFlagConstant.GROUP_LEADER.equals(resiGroupMemberDTO.getGroupLeaderFlag())) { | 
			
		
	
		
			
				
					|  |  |  | 			return new Result<CreateGroupInvitationResultDTO>().error(EpmetErrorCode.ONLY_LEADER_CAN_INVITE.getCode(), | 
			
		
	
		
			
				
					|  |  |  | 					EpmetErrorCode.ONLY_LEADER_CAN_INVITE.getMsg()); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		//1、只有群主可以邀请新成员(这块界面限制死了,只有群主才能看到邀请新成员按钮)
 | 
			
		
	
		
			
				
					|  |  |  | 		//2、审核通过(讨论中)的群才可以分享邀请连接
 | 
			
		
	
		
			
				
					|  |  |  | 		ResiGroupDTO resiGroupDTO = resiGroupService.get(formDTO.getGroupId()); | 
			
		
	
		
			
				
					|  |  |  | 		if (!GroupStateConstant.GROUP_APPROVED.equals(resiGroupDTO.getState())) { | 
			
		
	
	
		
			
				
					|  |  | @ -179,7 +171,7 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD | 
			
		
	
		
			
				
					|  |  |  | 		groupInvitationEntity.setInviterUserId(formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  | 		groupInvitationEntity.setInviterCustomerId(resiGroupDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  | 		groupInvitationEntity.setInviterGridId(resiGroupDTO.getGridId()); | 
			
		
	
		
			
				
					|  |  |  | 		//暂定7天有效期
 | 
			
		
	
		
			
				
					|  |  |  | 		//暂定14天有效期
 | 
			
		
	
		
			
				
					|  |  |  | 		Calendar calendar = Calendar.getInstance(); | 
			
		
	
		
			
				
					|  |  |  | 		calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) + NumConstant.FOURTEEN); | 
			
		
	
		
			
				
					|  |  |  | 		groupInvitationEntity.setValidEndTime(calendar.getTime()); | 
			
		
	
	
		
			
				
					|  |  | @ -210,7 +202,6 @@ public class GroupInvitationServiceImpl extends BaseServiceImpl<GroupInvitationD | 
			
		
	
		
			
				
					|  |  |  | 		ResiGroupMemberDTO resiGroupMemberDTO = resiGroupMemberDao.selectGroupMemberInfo(groupInvitationDTO.getResiGroupId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  | 		if (null != resiGroupMemberDTO && !MemberStateConstant.REMOVED.equals(resiGroupMemberDTO.getStatus())) { | 
			
		
	
		
			
				
					|  |  |  | 			linkGroupInfoResultDTO.setInGroup(Constant.YES); | 
			
		
	
		
			
				
					|  |  |  | //			return new Result<LinkGroupInfoResultDTO>().ok(linkGroupInfoResultDTO);
 | 
			
		
	
		
			
				
					|  |  |  | 		} else { | 
			
		
	
		
			
				
					|  |  |  | 			linkGroupInfoResultDTO.setInGroup(Constant.NO); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  | 
 |