Commit c004b49c by 王祖波

Merge branch 'bugfix-20231225' into 'master'

企微接口1000批次发送

See merge request !1595
parents 1b810b1a 78b4359a
...@@ -332,15 +332,19 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService { ...@@ -332,15 +332,19 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
if (ObjectUtil.isNull(noticeMessageTypeEnum)) { if (ObjectUtil.isNull(noticeMessageTypeEnum)) {
return ServiceResponse.failure("-1", "模版枚举不存在"); return ServiceResponse.failure("-1", "模版枚举不存在");
} }
noticeMessageHandler.sendMessage(NoticeMessageForm.builder() List<String> userIdList = relationList.stream().map(StaffClerkRelationDTO::getClerkId).distinct().collect(Collectors.toList());
.messageCode(noticeMessageTypeEnum.getMessageCode()) List<List<String>> listList = ListUtil.split(userIdList, 1000);
.mqRouterCode(noticeMessageTypeEnum.getRouterCode()) for (List<String> list : listList) {
.businessId(notifyMessageBatchQDTO.getOptTargetId()) noticeMessageHandler.sendMessage(NoticeMessageForm.builder()
.createTime(new Date()) .messageCode(noticeMessageTypeEnum.getMessageCode())
.enterpriseId(notifyMessageBatchQDTO.getEnterpriseId()) .mqRouterCode(noticeMessageTypeEnum.getRouterCode())
.uniqueKey(UniqueIdUtils.uniqueLongHex()) .businessId(notifyMessageBatchQDTO.getOptTargetId())
.userIdList(relationList.stream().map(StaffClerkRelationDTO::getClerkId).distinct().collect(Collectors.toList())) .createTime(new Date())
.variableMap(variableMap).build()); .enterpriseId(notifyMessageBatchQDTO.getEnterpriseId())
.uniqueKey(UniqueIdUtils.uniqueLongHex())
.userIdList(list)
.variableMap(variableMap).build());
}
} catch (Exception e) { } catch (Exception e) {
logger.error("发送消息通知失败",e); logger.error("发送消息通知失败",e);
} }
......
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