Commit 73cc0d1e by 徐高华

群链接编辑

parent c2173006
...@@ -50,7 +50,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService { ...@@ -50,7 +50,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
log.info("保存群链接={}", JSON.toJSONString(list)); log.info("保存群链接={}", JSON.toJSONString(list));
List<HmLinkChatDTO> updateList = list.stream().filter(dto -> null != dto.getLinkChatId()) List<HmLinkChatDTO> updateList = list.stream().filter(dto -> null != dto.getLinkChatId())
.collect(Collectors.toList()); .collect(Collectors.toList());
List<Long> notDelIdList = updateList.stream().map(dto -> dto.getChatHmId()).collect(Collectors.toList()); List<Long> notDelIdList = updateList.stream().map(dto -> dto.getLinkChatId()).collect(Collectors.toList());
log.info("不删除关联群活码={},{}", linkId, notDelIdList); log.info("不删除关联群活码={},{}", linkId, notDelIdList);
String wxEnterpriseId = list.get(0).getWxEnterpriseId(); String wxEnterpriseId = list.get(0).getWxEnterpriseId();
String enterpriseId = list.get(0).getEnterpriseId(); String enterpriseId = list.get(0).getEnterpriseId();
...@@ -81,11 +81,11 @@ public class HmLinkChatServiceImpl implements HmLinkChatService { ...@@ -81,11 +81,11 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
} }
// 更新其他链接 // 更新其他链接
List<Long> idList = list.stream().map(dto -> dto.getChatHmId()).collect(Collectors.toList()); List<Long> chatHmIdList = list.stream().map(dto -> dto.getChatHmId()).collect(Collectors.toList());
idList.add(otherHmId); chatHmIdList.add(otherHmId);
boolean addOther = false; boolean addOther = false;
if (null != link) { if (null != link) {
idList.add(link.getOtherChatHmId()); chatHmIdList.add(link.getOtherChatHmId());
if (!otherHmId.equals(link.getOtherChatHmId())) { if (!otherHmId.equals(link.getOtherChatHmId())) {
this.hmLinkChatMapper.delete(linkId, Arrays.asList(link.getOtherChatHmId()) , 1); this.hmLinkChatMapper.delete(linkId, Arrays.asList(link.getOtherChatHmId()) , 1);
addOther = true; addOther = true;
...@@ -110,10 +110,10 @@ public class HmLinkChatServiceImpl implements HmLinkChatService { ...@@ -110,10 +110,10 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
// 统计活码关联的链接数量 // 统计活码关联的链接数量
for (HmLinkChatDTO old : oldList) { for (HmLinkChatDTO old : oldList) {
idList.add(old.getChatHmId()); chatHmIdList.add(old.getChatHmId());
} }
log.info("群id={}",idList); log.info("群id={}",chatHmIdList);
this.groupChatHmService.updateLinkCount(wxEnterpriseId, idList); this.groupChatHmService.updateLinkCount(wxEnterpriseId, chatHmIdList);
return 0; return 0;
} }
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
chat_hm_id chatHmId, chat_hm_id chatHmId,
member_type memberType member_type memberType
from tab_haoban_hm_link_chat where link_id = #{linkId} and wx_enterprise_id = #{wxEnterpriseId} and enterprise_id = #{enterpriseId} and other_flag = 0 from tab_haoban_hm_link_chat where link_id = #{linkId} and wx_enterprise_id = #{wxEnterpriseId} and enterprise_id = #{enterpriseId} and other_flag = 0
and delete_flag = 0
</select> </select>
......
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