Commit db0b1f74 by 徐高华

Merge branch 'feature/社群' into 'developer'

群活码数量

See merge request !703
parents a37fcad0 bb9ae77d
......@@ -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());
}
......
......@@ -206,6 +206,7 @@ public class GroupChatPlanController {
sb.append(dto.getStaffName()).append(",");
});
c = sb.substring(0, sb.length() - 1) + "」";
content.append(c);
}
}
// 删除群主
......@@ -221,6 +222,7 @@ public class GroupChatPlanController {
sb.append(dto.getStaffName()).append(",");
});
d = sb.substring(0, sb.length() - 1) + "」";
content.append(d);
}
}
......@@ -231,6 +233,7 @@ public class GroupChatPlanController {
String date = DateUtil.dateToStr(oldDTO.getSendTime(), "yyyy-MM-dd HH:mm:ss");
sb.append("发送时间").append("「定时发送,").append(date).append("」变更为「").append("立即发送」");
e = sb.toString();
content.append(e);
}
} else {
String date1 = DateUtil.dateToStr(oldDTO.getSendTime(), "yyyy-MM-dd HH:mm:ss");
......@@ -240,16 +243,17 @@ public class GroupChatPlanController {
sb.append("发送时间").append("「定时发送,").append(date1).append("」变更为「").append("定时发送,").append(date2)
.append("」");
e = sb.toString();
content.append(e);
}
}
// 结束时间
String f = null;
if (!oldDTO.getExpireDays().equals(newDTO.getExpireDays())) {
content.append(f);
StringBuilder sb = new StringBuilder();
sb.append("结束时间").append("「").append(oldDTO.getExpireDays()).append("天后,").append("").append("」变更为「")
.append(newDTO.getExpireDays()).append("天后,").append("").append("」");
return sb.toString();
f = sb.toString();
content.append(f);
}
if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d, e, f)) {
return null;
......
......@@ -232,6 +232,7 @@ public class HmLinkController {
}
sb.append("其他可入群").append("「").append(oldValue).append("」变更为「").append(newValue).append("」");
c = sb.toString();
content.append(c);
}
// 落地页
String d = null;
......@@ -249,6 +250,7 @@ public class HmLinkController {
}
sb.append("落地页模板").append("「").append(oldValue).append("」变更为「").append(newValue).append("」");
d = sb.toString();
content.append(d);
}
if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d)) {
return null;
......
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