Commit bbef701b by 王祖波

Merge branch 'feature-recommend2' into 'developer'

查询群发结果重试

See merge request !2888
parents 13ac9292 a0c18b8d
......@@ -118,6 +118,23 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
if (CollectionUtils.isEmpty(sendResultList)) {
return;
}
//判断是否已经发送
List<GroupSendResultBO> noSendList = sendResultList.stream().filter(dto -> Objects.equals(dto.getStatus(), 0))
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(noSendList)) {
Integer tryCount = dealQwSendDTO.getTryCount();
if (tryCount != null && tryCount >= 10) {
return;
}
if (tryCount == null) {
tryCount = 0;
}
// 重新刷新
dealQwSendDTO.setRefreshType(2);
dealQwSendDTO.setTryCount(++tryCount);
MqUtils.sendMessageToMQ("qwSendRefreshByMQ", JSON.toJSONString(dealQwSendDTO), 60);
return;
}
log.info("刷新企微群发结果:{}", qwSendMsg.getMsgId());
List<TabQwSendLog> entities;
List<List<GroupSendResultBO>> partition = Lists.partition(sendResultList, 1000);
......@@ -174,10 +191,7 @@ public class QwSendMsgServiceImpl implements QwSendMsgService {
log.error("未查询到userid");
return Collections.emptyList();
}
List<GroupSendResultBO> sendResultList = getSendResult(qwSendMsg.getWxEnterpriseId(), qwSendMsg.getMsgId(), newWxUserId);
//判断是否已经发送
return sendResultList.stream().filter(dto -> !Objects.equals(dto.getStatus(), 0))
.collect(Collectors.toList());
return getSendResult(qwSendMsg.getWxEnterpriseId(), qwSendMsg.getMsgId(), newWxUserId);
}
public List<GroupSendResultBO> getSendResult(String wxEnterpriseId, String msgId, String userId) {
......
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