Commit a0d2ac63 by 王祖波

Merge branch 'bugfix-20231225' into 'developer'

Bugfix 20231225

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