| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -24,7 +24,6 @@ import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.FieldConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.ErrorCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.security.dto.TokenDto; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -61,7 +60,6 @@ import com.epmet.resi.group.dto.group.result.MyGroupResultDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.resi.group.dto.group.result.RecommendGroupResultDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.resi.group.dto.member.GroupMemeberOperationDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import net.bytebuddy.asm.Advice; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.slf4j.Logger; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import org.slf4j.LoggerFactory; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -424,31 +422,63 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						/** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @param auditApplyGroupFormDTO | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @param agreeApplyGroupFormDTO | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @return com.epmet.commons.tools.utils.Result | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Author yinzuomei | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Description 审核群申请-测试用后面会放到政府端 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Date 2020/3/31 12:44 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						@Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public Result auditApplyGroup(AuditApplyGroupFormDTO auditApplyGroupFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public Result agreeApplyGroup(AgreeApplyGroupFormDTO agreeApplyGroupFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//1、更新组的状态
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupDTO resiGroupDTO = this.get(auditApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupDTO resiGroupDTO = this.get(agreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupDTO.setState(GroupStateConstant.GROUP_APPROVED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							this.update(resiGroupDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//2、更新组的申请记录改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupOperationDTO resiGroupOperation = resiGroupOperationDao.selectGroupApplyRecord(auditApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupOperationDTO resiGroupOperation = resiGroupOperationDao.selectGroupApplyRecord(agreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setState(GroupStateConstant.GROUP_APPROVED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setOperateUserId(auditApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setOperateUserId(agreeApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperationService.update(resiGroupOperation); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//3、将群主在群成员的状态改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupMemberDTO resiGroupMemberDTO=resiGroupMemberDao.selectLeaderMember(auditApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupMemberDTO resiGroupMemberDTO=resiGroupMemberDao.selectLeaderMember(agreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupMemberDTO.setStatus(MemberStateConstant.APPROVED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupMemberService.update(resiGroupMemberDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//4、更新群主的出入群记录改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							GroupMemeberOperationDTO groupMemeberOperationDTO=groupMemeberOperationDao.selectLeaderRecord(auditApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							GroupMemeberOperationDTO groupMemeberOperationDTO=groupMemeberOperationDao.selectLeaderRecord(agreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationDTO.setOperateStatus(MemberStateConstant.APPROVED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationDTO.setOperateUserId(auditApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationDTO.setOperateUserId(agreeApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationService.update(groupMemeberOperationDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//5、给用户发送消息???待定
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return new Result(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						/** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @param disAgreeApplyGroupFormDTO | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @return com.epmet.commons.tools.utils.Result | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Author yinzuomei | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Description 审核(拒绝)群申请-测试用后面会放到政府端 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @Date 2020/3/31 13:22 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 **/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						@Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public Result disagreeApplyGroup(DisAgreeApplyGroupFormDTO disAgreeApplyGroupFormDTO) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//1、更新组的状态
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupDTO resiGroupDTO = this.get(disAgreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupDTO.setState(GroupStateConstant.GROUP_REJECTED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							this.update(resiGroupDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//2、更新组的申请记录改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupOperationDTO resiGroupOperation = resiGroupOperationDao.selectGroupApplyRecord(disAgreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setState(GroupStateConstant.GROUP_REJECTED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setOperateUserId(disAgreeApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperation.setOperateReason(disAgreeApplyGroupFormDTO.getRejectReason()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupOperationService.update(resiGroupOperation); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//3、将群主在群成员的状态改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							ResiGroupMemberDTO resiGroupMemberDTO=resiGroupMemberDao.selectLeaderMember(disAgreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupMemberDTO.setStatus(MemberStateConstant.REJECTED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							resiGroupMemberService.update(resiGroupMemberDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//4、更新群主的出入群记录改为已通过
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							GroupMemeberOperationDTO groupMemeberOperationDTO=groupMemeberOperationDao.selectLeaderRecord(disAgreeApplyGroupFormDTO.getGroupId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationDTO.setOperateStatus(MemberStateConstant.REJECTED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationDTO.setOperateUserId(disAgreeApplyGroupFormDTO.getUserId()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							groupMemeberOperationService.update(groupMemeberOperationDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//5、给用户发送消息???待定
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return new Result(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |