Commit bc375ff4 by 徐高华

结束不统计

parent 0b2d5ed6
...@@ -321,6 +321,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -321,6 +321,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
int sendCount = 0; int sendCount = 0;
int failCount = 0; int failCount = 0;
List<TabGroupChatPlanLog> addList = new ArrayList<>(); List<TabGroupChatPlanLog> addList = new ArrayList<>();
boolean endFlag = false ;
for (QywxSendMessageResultDTO item : list) { for (QywxSendMessageResultDTO item : list) {
TabGroupChatPlanLog entity = new TabGroupChatPlanLog(); TabGroupChatPlanLog entity = new TabGroupChatPlanLog();
Date sendTime = item.getSendTime(); Date sendTime = item.getSendTime();
...@@ -328,6 +329,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -328,6 +329,7 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
// 如果企微的发送时间晚于计划的结束时间,不记录此类数据 // 如果企微的发送时间晚于计划的结束时间,不记录此类数据
if (sendTime.after(plan.getEndTime())) { if (sendTime.after(plan.getEndTime())) {
logger.info("发送时间晚计划结束"); logger.info("发送时间晚计划结束");
endFlag = true ;
continue; continue;
} }
GroupChatBO chat = this.groupChatService.getByWxChatId(wxEnterpriseId, wxChatId); GroupChatBO chat = this.groupChatService.getByWxChatId(wxEnterpriseId, wxChatId);
...@@ -362,7 +364,9 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -362,7 +364,9 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
} }
if (CollectionUtils.isNotEmpty(addList)) { if (CollectionUtils.isNotEmpty(addList)) {
this.groupChatPlanLogMapper.batchInsert(addList); this.groupChatPlanLogMapper.batchInsert(addList);
// 更新统计数量、状态 }
// 更新统计数量、状态
if(!endFlag) {
this.groupChatPlanOwnerLogService.updateSendCount(ownerLog.getOwnerLogId(), sendCount, this.groupChatPlanOwnerLogService.updateSendCount(ownerLog.getOwnerLogId(), sendCount,
list.get(0).getSendTime(), failCount); list.get(0).getSendTime(), failCount);
// 完成代办 // 完成代办
......
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