Commit ef049708 authored by 黎博's avatar 黎博

新增消费地图线上BUG提醒和每日工单提醒

parent 8b48be83
package cn.qg.holmes.service.quality.impl;
import cn.hutool.core.text.replacer.StrReplacer;
import cn.qg.holmes.config.UserPhoneMap;
import cn.qg.holmes.entity.quality.DingRobot;
import cn.qg.holmes.entity.quality.JiraBugPool;
......@@ -42,6 +43,9 @@ public class WebhookServiceImpl implements WebhookService {
@Value("${gylyw.prod.ding.url}")
private String gylywProdDingUrl;
@Value("${xfdtxs.prod.ding.url}")
private String xfdtxsProdDingUrl;
@Autowired
UserPhoneMap userPhoneMap;
......@@ -83,7 +87,11 @@ public class WebhookServiceImpl implements WebhookService {
// webhook赋值为电商群的机器人地址
webhook = dsProdDingUrl;
} else if (StringUtils.equals(key.split("-")[0], "GYLYW")) {
// 供应链业务
webhook = gylywProdDingUrl;
} else if (StringUtils.equals(key.split("-")[0], "XFDTXS")) {
// 消费地图线上
webhook = xfdtxsProdDingUrl;
} else if (StringUtils.equals(key.split("-")[0], "CSXT")) {
webhook = "https://oapi.dingtalk.com/robot/send?access_token=be220b4bd17f311d70365a0ee81a659b54f06d52f1ee8d4d7d1051a183a266e1";
}
......
......@@ -56,6 +56,9 @@ public class BugNotifyTask {
@Value("${gylyw.prod.ding.url}")
private String gylywProdDingUrl;
@Value("${xfdtxs.prod.ding.url}")
private String xfdtxsProdDingUrl;
/**
* 数据工单bug统计
......@@ -210,4 +213,16 @@ public class BugNotifyTask {
DingdingUtils.sendToDingding(DingdingUtils.buildDailyProdBugNotifyMsgForBusiness(jrUnsolvedList), gylywProdDingUrl);
}
}
/**
* 消费地图线上每日工单提醒
* @throws Exception
*/
@Scheduled(cron = "0 0 10,18 ? * *")
public void xfdtxsProdBugDailyNotifyTask() throws Exception {
if (scheduledTaskStart.equals("true")) {
Iterable<Issue> dsUnsolvedList = jiraService.getIssueListByJQL("project = XFDTXS AND resolution = Unresolved ORDER BY priority DESC, created DESC");
DingdingUtils.sendToDingding(DingdingUtils.buildDailyProdBugNotifyMsg(dsUnsolvedList), xfdtxsProdDingUrl);
}
}
}
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