Commit 52e962d4 by 徐高华

群活码数量

parent 4b818034
......@@ -50,7 +50,11 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
List<HmLinkChatDTO> updateList = list.stream().filter(dto -> null != dto.getLinkChatId())
.collect(Collectors.toList());
List<Long> notDelIdList = updateList.stream().map(dto -> dto.getChatHmId()).collect(Collectors.toList());
log.info("不删除={},{}", linkId, notDelIdList);
log.info("不删除关联群活码={},{}", linkId, notDelIdList);
String wxEnterpriseId = list.get(0).getWxEnterpriseId();
String enterpriseId = list.get(0).getEnterpriseId();
// 先查出历史记录
List<HmLinkChatDTO> oldList = this.hmLinkChatMapper.listByLinkId(wxEnterpriseId, enterpriseId, linkId);
this.hmLinkChatMapper.delete(linkId, notDelIdList);
if (CollectionUtils.isNotEmpty(updateList)) {
for (HmLinkChatDTO item : updateList) {
......@@ -82,9 +86,6 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
idList.add(link.getOtherChatHmId());
}
// 统计活码关联的链接数量
String wxEnterpriseId = list.get(0).getWxEnterpriseId();
String enterpriseId = list.get(0).getEnterpriseId();
List<HmLinkChatDTO> oldList = this.hmLinkChatMapper.listByLinkId(wxEnterpriseId, enterpriseId, linkId);
for (HmLinkChatDTO old : oldList) {
idList.add(old.getChatHmId());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment