|
|
@ -57,6 +57,7 @@ import com.epmet.modules.constant.WxmpSubscribeConstant; |
|
|
|
import com.epmet.modules.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.modules.feign.GovIssueFeignClient; |
|
|
|
import com.epmet.modules.feign.GovOrgFeignClient; |
|
|
|
import com.epmet.modules.group.dao.GroupMessageDao; |
|
|
|
import com.epmet.modules.group.dao.ResiGroupDao; |
|
|
|
import com.epmet.modules.group.dao.ResiGroupStatisticalDao; |
|
|
|
import com.epmet.modules.group.entity.ResiGroupEntity; |
|
|
@ -183,6 +184,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
@Autowired |
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GroupMessageDao groupMessageDao; |
|
|
|
|
|
|
|
@Value("${openapi.scan.server.url}") |
|
|
|
private String scanApiUrl; |
|
|
|
@Value("${openapi.scan.method.textSyncScan}") |
|
|
@ -2273,7 +2277,44 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<GetPastTopicListV2ResultDTO> getPastTopicListV2(GetPastTopicListV2FormDTO formDTO) { |
|
|
|
return null; |
|
|
|
PageInfo<String> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> groupMessageDao.selectNeedIds(formDTO.getGroupId())); |
|
|
|
List<String> ids = pageInfo.getList(); |
|
|
|
if (CollectionUtils.isEmpty(ids)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
// 根据IDs查询 topic,act,notice信息
|
|
|
|
List<GetPastTopicListV2ResultDTO> infos = resiGroupDao.getPastTopicListV2ByIds(ids); |
|
|
|
if (CollectionUtils.isEmpty(infos)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
ResiGroupEntity resiGroup = resiGroupDao.selectById(formDTO.getGroupId()); |
|
|
|
List<String> userIds = infos.stream().map(m -> m.getUserId()).collect(Collectors.toList()); |
|
|
|
// 用户信息
|
|
|
|
List<UserInfoResultDTO> userInfos = this.disPoseUserInfo(resiGroup.getGroupType(), userIds); |
|
|
|
// 各字段赋值
|
|
|
|
infos.forEach(i -> { |
|
|
|
// 用户头像,姓名赋值
|
|
|
|
if (!CollectionUtils.isEmpty(userInfos)){ |
|
|
|
userInfos.forEach(u -> { |
|
|
|
if (i.getUserId().equals(u.getUserId())){ |
|
|
|
i.setReleaseUserName(u.getReleaseUserName()); |
|
|
|
i.setReleaseUserHeadPhoto(u.getReleaseUserHeadPhoto()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
// 是否是本人赋值
|
|
|
|
i.setReleaseUserFlag(formDTO.getUserId().equals(i.getUserId())); |
|
|
|
// 是否转议题赋值
|
|
|
|
i.setShiftIssueFlag(StringUtils.isNotEmpty(i.getIssueId())); |
|
|
|
if (i.getReleaseUserFlag()==true){ |
|
|
|
// 如果此贴是自己发布的,肯定是已读
|
|
|
|
i.setReadOrUnRead(ModuleConstant.READ_FLAG_YES); |
|
|
|
}else { |
|
|
|
// TODO 不是自己发布的
|
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
return infos; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|