推送评论通知增加批量推送功能
This commit is contained in:
parent
b6b774ed29
commit
521be55258
@ -748,11 +748,30 @@ public class DingtalkBusiness {
|
|||||||
String content = WorkMsgTypeEnum.TASK_REPLY_COMMENT.getContent().replace("@1", fromStaffSimpleInfo.getName());
|
String content = WorkMsgTypeEnum.TASK_REPLY_COMMENT.getContent().replace("@1", fromStaffSimpleInfo.getName());
|
||||||
content = content.replace("@2", "“" + resultDetail.getTarget() + "”");
|
content = content.replace("@2", "“" + resultDetail.getTarget() + "”");
|
||||||
logger.info("通知内容{},url{}", content, url);
|
logger.info("通知内容{},url{}", content, url);
|
||||||
for (StaffEntity info:staffEntities
|
String userIds = "";
|
||||||
|
int m = 0;
|
||||||
|
for (int i = 0; i < staffEntities.size(); i++) {
|
||||||
|
StaffEntity staff = staffEntities.get(i);
|
||||||
|
userIds += (staff.getEmployeeId() + ",");
|
||||||
|
if(m >= 99 || i == staffEntities.size() - 1){
|
||||||
|
//发送消息
|
||||||
|
StaffEntity info = new StaffEntity();
|
||||||
|
info.setId(0L);
|
||||||
|
info.setEmployeeId(userIds);
|
||||||
|
logger.info("推送的人员信息{}", info);
|
||||||
|
dingTalkUtil.sendSingleActionCardMSG(appid, info, WorkMsgTypeEnum.TASK_REPLY_COMMENT.getTitle(),
|
||||||
|
WorkMsgTypeEnum.TASK_REPLY_COMMENT.getContent(), WorkMsgTypeEnum.TASK_REPLY_COMMENT.getBtnText(), url, token);
|
||||||
|
m = 0;
|
||||||
|
userIds = "";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
m++;
|
||||||
|
}
|
||||||
|
/*for (StaffEntity info:staffEntities
|
||||||
) {
|
) {
|
||||||
dingTalkUtil.sendSingleActionCardMSG(appid, info, WorkMsgTypeEnum.TASK_REPLY_COMMENT.getTitle(),
|
dingTalkUtil.sendSingleActionCardMSG(appid, info, WorkMsgTypeEnum.TASK_REPLY_COMMENT.getTitle(),
|
||||||
content, WorkMsgTypeEnum.TASK_REPLY_COMMENT.getBtnText(), url, token);
|
content, WorkMsgTypeEnum.TASK_REPLY_COMMENT.getBtnText(), url, token);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
return "OK";
|
return "OK";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user