增加任务更新推送消息提醒
This commit is contained in:
parent
fb1e6480e7
commit
13fe3bdb7c
@ -25,6 +25,7 @@ public enum WorkMsgTypeEnum {
|
|||||||
TRANSFER(11, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
|
TRANSFER(11, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
|
||||||
CLEARN(12, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
|
CLEARN(12, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
|
||||||
TASK_COMMENT(13, "任务评论", "去查看", "# 任务评论\n ## @1评论了你的@2的任务"),
|
TASK_COMMENT(13, "任务评论", "去查看", "# 任务评论\n ## @1评论了你的@2的任务"),
|
||||||
|
TASK_UPDATE(14, "任务更新", "去更新", "# 任务更新\n ## 记得每天来更新任务哦"),
|
||||||
// 您的2020年10月绩效考核已经开始,请尽快制定绩效目标
|
// 您的2020年10月绩效考核已经开始,请尽快制定绩效目标
|
||||||
// 吴林的2020年12月绩效考核的目标需要您确认,点击前往确认
|
// 吴林的2020年12月绩效考核的目标需要您确认,点击前往确认
|
||||||
;
|
;
|
||||||
|
|||||||
@ -661,6 +661,43 @@ public class DingtalkBusiness {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String sendTaskInputMsg(List<StaffEntity> staffs){
|
public String sendTaskInputMsg(List<StaffEntity> staffs){
|
||||||
|
int m = 0;
|
||||||
|
String userIds = "";
|
||||||
|
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
|
||||||
|
String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig);
|
||||||
|
if(token != null && token.length() > 0){
|
||||||
|
String url = homeUrl;
|
||||||
|
if(url.contains("?")){
|
||||||
|
url += "&halokit=" + System.currentTimeMillis();
|
||||||
|
}else{
|
||||||
|
url += "?halokit=" + System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
url = URLEncoder.encode(url);
|
||||||
|
|
||||||
|
|
||||||
|
url = "dingtalk://dingtalkclient/action/openapp?corpid=" + thirdAppConfig.getCorpId() +
|
||||||
|
"&container_type=work_platform&app_id=0_" +
|
||||||
|
appid + "&redirect_type=jump&redirect_url=" + url;
|
||||||
|
|
||||||
|
for (StaffEntity staff:staffs
|
||||||
|
) {
|
||||||
|
|
||||||
|
if(m < 100){
|
||||||
|
userIds += (staff.getEmployeeId() + ",");
|
||||||
|
}else{
|
||||||
|
//发送消息
|
||||||
|
StaffEntity info = new StaffEntity();
|
||||||
|
info.setId(0L);
|
||||||
|
info.setEmployeeId(userIds);
|
||||||
|
dingTalkUtil.sendSingleActionCardMSG(appid, info, WorkMsgTypeEnum.TASK_UPDATE.getTitle(),
|
||||||
|
WorkMsgTypeEnum.TASK_UPDATE.getContent(), WorkMsgTypeEnum.TASK_UPDATE.getBtnText(), url, token);
|
||||||
|
m = 0;
|
||||||
|
userIds = staff.getEmployeeId() + ",";
|
||||||
|
}
|
||||||
|
m++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return "OK";
|
return "OK";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user