| 
						
						
							
								
							
						
						
					 | 
					@ -17,6 +17,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.modules.topic.service.impl; | 
					 | 
					 | 
					package com.epmet.modules.topic.service.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
					 | 
					 | 
					import com.baomidou.mybatisplus.core.metadata.IPage; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
					 | 
					 | 
					import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -50,13 +51,15 @@ import com.epmet.resi.group.constant.MemberStateConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.constant.TopicConstant; | 
					 | 
					 | 
					import com.epmet.resi.group.constant.TopicConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.member.ResiGroupMemberDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.ResiTopicDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.ResiTopicDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicOperationFormDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicOperationFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicPageFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicPublishFormDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.form.ResiTopicPublishFormDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; | 
					 | 
					 | 
					import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
					 | 
					 | 
					import org.apache.commons.lang3.StringUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.apache.commons.logging.Log; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.apache.commons.logging.LogFactory; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import org.bouncycastle.math.raw.Mod; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
					 | 
					 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
					 | 
					 | 
					import org.springframework.stereotype.Service; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
					 | 
					 | 
					import org.springframework.transaction.annotation.Transactional; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -100,6 +103,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    RedisUtils redisUtil; | 
					 | 
					 | 
					    RedisUtils redisUtil; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private final Log logger = LogFactory.getLog(getClass()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PageData<ResiTopicDTO> page(Map<String, Object> params) { | 
					 | 
					 | 
					    public PageData<ResiTopicDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -190,6 +194,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        baseDao.insertOne(topic); | 
					 | 
					 | 
					        baseDao.insertOne(topic); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(StringUtils.isBlank(topic.getId())){ | 
					 | 
					 | 
					        if(StringUtils.isBlank(topic.getId())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //没有返回主键
 | 
					 | 
					 | 
					            //没有返回主键
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.NO_PRIMARY_KEY_RETURNED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_PRIMARY_KEY_RETURNED); | 
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_PRIMARY_KEY_RETURNED); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null != resiTopicPublishFormDTO.getAttachmentList() && resiTopicPublishFormDTO.getAttachmentList().size() > 0){ | 
					 | 
					 | 
					        if(null != resiTopicPublishFormDTO.getAttachmentList() && resiTopicPublishFormDTO.getAttachmentList().size() > 0){ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -199,7 +204,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                attachment.setAttachmentUrl(url); | 
					 | 
					 | 
					                attachment.setAttachmentUrl(url); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                attachment.setTopicId(topic.getId()); | 
					 | 
					 | 
					                attachment.setTopicId(topic.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                attachment.setCreatedBy(tokenDto.getUserId()); | 
					 | 
					 | 
					                attachment.setCreatedBy(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + 1).toLowerCase()); | 
					 | 
					 | 
					                attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					                attachment.setSort(sort++); | 
					 | 
					 | 
					                attachment.setSort(sort++); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                resiTopicAttachmentDao.insertOne(attachment); | 
					 | 
					 | 
					                resiTopicAttachmentDao.insertOne(attachment); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -219,6 +224,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<ResiGroupStatisticalEntity> statistical =  resiGroupStatisticalDao.selectList(wrapper); | 
					 | 
					 | 
					        List<ResiGroupStatisticalEntity> statistical =  resiGroupStatisticalDao.selectList(wrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null != statistical && statistical.size() >= NumConstant.ONE){ | 
					 | 
					 | 
					        if(null != statistical && statistical.size() >= NumConstant.ONE){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if(statistical.size() != NumConstant.ONE){ | 
					 | 
					 | 
					            if(statistical.size() != NumConstant.ONE){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                logger.warn(ModuleConstant.GROUP_STASTICAL_NOT_SINGLE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                return new Result().error(ModuleConstant.GROUP_STASTICAL_NOT_SINGLE); | 
					 | 
					 | 
					                return new Result().error(ModuleConstant.GROUP_STASTICAL_NOT_SINGLE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ResiGroupStatisticalEntity statistical2Update = new ResiGroupStatisticalEntity(); | 
					 | 
					 | 
					                ResiGroupStatisticalEntity statistical2Update = new ResiGroupStatisticalEntity(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -229,6 +235,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                resiGroupStatisticalDao.updateById(statistical2Update); | 
					 | 
					 | 
					                resiGroupStatisticalDao.updateById(statistical2Update); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }else{ | 
					 | 
					 | 
					        }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.NO_SUCH_GROUP_STASTICAL_INFO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_GROUP_STASTICAL_INFO); | 
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_GROUP_STASTICAL_INFO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -352,6 +359,20 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        operationRecord.setCreatedBy(tokenDto.getUserId()); | 
					 | 
					 | 
					        operationRecord.setCreatedBy(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        resiTopicOperationDao.insertOne(operationRecord); | 
					 | 
					 | 
					        resiTopicOperationDao.insertOne(operationRecord); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        // 4.组话题数量-1 (对应的在解除屏蔽时组话题数量+1)
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        QueryWrapper<ResiGroupStatisticalEntity> statisticalWrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        statisticalWrapper.eq(TopicConstant.RESI_GROUP_ID,topic.getGroupId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        statisticalWrapper.eq(FieldConstant.DEL_FLAG,NumConstant.ZERO_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ResiGroupStatisticalEntity statistical = resiGroupStatisticalDao.selectOne(statisticalWrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(null != statistical && StringUtils.isNotBlank(statistical.getId()) && StringUtils.isNotBlank(statistical.getResiGroupId())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ResiGroupStatisticalEntity statistical2Update = new ResiGroupStatisticalEntity(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            statistical2Update.setId(statistical.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            statistical2Update.setTotalTopics( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    null == statistical.getTotalTopics() || statistical.getTotalTopics() == 0 ? 0 : statistical.getTotalTopics() - NumConstant.ONE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiGroupStatisticalDao.updateById(statistical2Update); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new Result(); | 
					 | 
					 | 
					        return new Result(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -391,6 +412,18 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            operation.setCreatedBy(tokenDto.getUserId()); | 
					 | 
					 | 
					            operation.setCreatedBy(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            resiTopicOperationDao.insertOne(operation); | 
					 | 
					 | 
					            resiTopicOperationDao.insertOne(operation); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        QueryWrapper<ResiGroupStatisticalEntity> statisticalWrapper = new QueryWrapper<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        statisticalWrapper.eq(TopicConstant.RESI_GROUP_ID,topic.getGroupId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        statisticalWrapper.eq(FieldConstant.DEL_FLAG,NumConstant.ZERO_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        ResiGroupStatisticalEntity statistical = resiGroupStatisticalDao.selectOne(statisticalWrapper); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if(null != statistical && StringUtils.isNotBlank(statistical.getId())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ResiGroupStatisticalEntity statistical2Update = new ResiGroupStatisticalEntity(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            statistical2Update.setId(statistical.getId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            statistical2Update.setTotalTopics( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    statistical.getTotalTopics() == null  ? 0 : statistical.getTotalTopics() + topicIds.size() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resiGroupStatisticalDao.updateById(statistical2Update); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new Result(); | 
					 | 
					 | 
					        return new Result(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -442,14 +475,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     **/ | 
					 | 
					 | 
					     **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Result<ResiTopicDetailResultDTO> getTopicDetail(TokenDto tokenDto, String topicId) { | 
					 | 
					 | 
					    public Result<ResiTopicDetailResultDTO> getTopicDetail(TokenDto tokenDto, String topicId) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(StringUtils.isBlank(topicId)){ | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result<ResiTopicDetailResultDTO>().error(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //1.获取话题基本信息
 | 
					 | 
					 | 
					        //1.获取话题基本信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ResiTopicEntity topicDetail = baseDao.selectById(topicId); | 
					 | 
					 | 
					        ResiTopicEntity topicDetail = baseDao.selectById(topicId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null == topicDetail || !StringUtils.equals(topicDetail.getId(),topicId)){ | 
					 | 
					 | 
					        if(null == topicDetail || !StringUtils.equals(topicDetail.getId(),topicId)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.NO_SUCH_TOPIC); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_TOPIC); | 
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_TOPIC); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ResiTopicDetailResultDTO resultDTO = new ResiTopicDetailResultDTO(); | 
					 | 
					 | 
					        ResiTopicDetailResultDTO resultDTO = new ResiTopicDetailResultDTO(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -483,7 +512,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                resultDTO.setReleaseUserHeadPhoto(userInfo.getData().getHeadPhoto()); | 
					 | 
					 | 
					                resultDTO.setReleaseUserHeadPhoto(userInfo.getData().getHeadPhoto()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					        }else{ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -501,6 +531,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					     **/ | 
					 | 
					 | 
					     **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Result<List<ResiTopicInfoResultDTO>> getHiddenTopics(TokenDto tokenDto, ResiTopicPageFormDTO topicPageFormDTO) { | 
					 | 
					 | 
					    public Result<List<ResiTopicInfoResultDTO>> getHiddenTopics(TokenDto tokenDto, ResiTopicPageFormDTO topicPageFormDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //1.查询屏蔽话题列表
 | 
					 | 
					 | 
					        //1.查询屏蔽话题列表
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        topicPageFormDTO.setUserId(tokenDto.getUserId()); | 
					 | 
					 | 
					        topicPageFormDTO.setUserId(tokenDto.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        topicPageFormDTO.setPageNo((topicPageFormDTO.getPageNo() - NumConstant.ONE) * topicPageFormDTO.getPageSize()); | 
					 | 
					 | 
					        topicPageFormDTO.setPageNo((topicPageFormDTO.getPageNo() - NumConstant.ONE) * topicPageFormDTO.getPageSize()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -510,7 +541,17 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                baseDao.getPastTopics(topicPageFormDTO); | 
					 | 
					 | 
					                baseDao.getPastTopics(topicPageFormDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        //2.遍历用户信息
 | 
					 | 
					 | 
					        //2.遍历用户信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null != hiddenTopics && hiddenTopics.size() > 0) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            List<String> userIdList = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            for (ResiTopicInfoResultDTO topic : hiddenTopics) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                userIdList.add(topic.getUserId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            UserResiInfoListFormDTO formDTO = new UserResiInfoListFormDTO(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            formDTO.setUserIdList(userIdList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult = epmetUserFeignClient.getUserResiInfoList(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            setUserInfo(userResiInfoDTOListResult, hiddenTopics); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return new Result<List<ResiTopicInfoResultDTO>>().ok(hiddenTopics); | 
					 | 
					 | 
					        return new Result<List<ResiTopicInfoResultDTO>>().ok(hiddenTopics); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -526,15 +567,18 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(null != resiGroupMemberDTO){ | 
					 | 
					 | 
					        if(null != resiGroupMemberDTO){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if(MemberStateConstant.SILENT.equals(resiGroupMemberDTO.getStatus())){ | 
					 | 
					 | 
					            if(MemberStateConstant.SILENT.equals(resiGroupMemberDTO.getStatus())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //当前用户被禁言
 | 
					 | 
					 | 
					                //当前用户被禁言
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                logger.error(ModuleConstant.SLIENT_MEMBER); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                return new Result().error(ModuleConstant.SLIENT_MEMBER); | 
					 | 
					 | 
					                return new Result().error(ModuleConstant.SLIENT_MEMBER); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else if(MemberStateConstant.REMOVED.equals(resiGroupMemberDTO.getStatus())){ | 
					 | 
					 | 
					            }else if(MemberStateConstant.REMOVED.equals(resiGroupMemberDTO.getStatus())){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //当前用户已被移出群
 | 
					 | 
					 | 
					                //当前用户已被移出群
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                logger.error(ModuleConstant.REMOVED_MEMBER); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                return new Result().error(ModuleConstant.REMOVED_MEMBER); | 
					 | 
					 | 
					                return new Result().error(ModuleConstant.REMOVED_MEMBER); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                return new Result(); | 
					 | 
					 | 
					                return new Result(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }else{ | 
					 | 
					 | 
					        }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //当前用户非组内成员
 | 
					 | 
					 | 
					            //当前用户非组内成员
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result().error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
					 | 
					 | 
					            return new Result().error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -553,6 +597,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //1.2判断是否是组长
 | 
					 | 
					 | 
					                //1.2判断是否是组长
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                if(!StringUtils.equals(leaderVerify.getCustomerUserId(),userId)){ | 
					 | 
					 | 
					                if(!StringUtils.equals(leaderVerify.getCustomerUserId(),userId)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    //非组长,无权限进行操作
 | 
					 | 
					 | 
					                    //非组长,无权限进行操作
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    logger.warn(ModuleConstant.NO_TEAMLEADER_AUTH); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    return new Result().error(ModuleConstant.NO_TEAMLEADER_AUTH); | 
					 | 
					 | 
					                    return new Result().error(ModuleConstant.NO_TEAMLEADER_AUTH); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                }else{ | 
					 | 
					 | 
					                }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    //是组长
 | 
					 | 
					 | 
					                    //是组长
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -560,14 +605,24 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            }else{ | 
					 | 
					 | 
					            }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                //未找到当前用户的成员信息
 | 
					 | 
					 | 
					                //未找到当前用户的成员信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                logger.warn(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                return new Result().error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
					 | 
					 | 
					                return new Result().error(ModuleConstant.NOT_BELONG_TO_CURRENT_GROUP); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        }else{ | 
					 | 
					 | 
					        }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            //未能识别该话题基本信息
 | 
					 | 
					 | 
					            //未能识别该话题基本信息
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.NO_SUCH_TOPIC); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_TOPIC); | 
					 | 
					 | 
					            return new Result().error(ModuleConstant.NO_SUCH_TOPIC); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Description 将用户信息(头像、昵称)遍历到返回的查询话题结果中  TODO 后期要改到缓存中 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Param Result<List<UserResiInfoResultDTO>> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Param List<ResiTopicInfoResultDTO> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @return void | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Author wangc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     * @Date 2020.04.10 17:47 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					     **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void setUserInfo(Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult,List<ResiTopicInfoResultDTO> topics){ | 
					 | 
					 | 
					    public void setUserInfo(Result<List<UserResiInfoResultDTO>> userResiInfoDTOListResult,List<ResiTopicInfoResultDTO> topics){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if(userResiInfoDTOListResult.success() && null != userResiInfoDTOListResult.getData()){ | 
					 | 
					 | 
					        if(userResiInfoDTOListResult.success() && null != userResiInfoDTOListResult.getData()){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            if(userResiInfoDTOListResult.getData().size() > 0){ | 
					 | 
					 | 
					            if(userResiInfoDTOListResult.getData().size() > 0){ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -581,6 +636,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    } | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                } | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }else{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            logger.warn(ModuleConstant.USER_INFO_LIST_NOT_FOUND); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |