Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
ef049708
Commit
ef049708
authored
Jul 22, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增消费地图线上BUG提醒和每日工单提醒
parent
8b48be83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
WebhookServiceImpl.java
...cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
+8
-0
BugNotifyTask.java
src/main/java/cn/qg/holmes/task/BugNotifyTask.java
+15
-0
No files found.
src/main/java/cn/qg/holmes/service/quality/impl/WebhookServiceImpl.java
View file @
ef049708
package
cn
.
qg
.
holmes
.
service
.
quality
.
impl
;
package
cn
.
qg
.
holmes
.
service
.
quality
.
impl
;
import
cn.hutool.core.text.replacer.StrReplacer
;
import
cn.qg.holmes.config.UserPhoneMap
;
import
cn.qg.holmes.config.UserPhoneMap
;
import
cn.qg.holmes.entity.quality.DingRobot
;
import
cn.qg.holmes.entity.quality.DingRobot
;
import
cn.qg.holmes.entity.quality.JiraBugPool
;
import
cn.qg.holmes.entity.quality.JiraBugPool
;
...
@@ -42,6 +43,9 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -42,6 +43,9 @@ public class WebhookServiceImpl implements WebhookService {
@Value
(
"${gylyw.prod.ding.url}"
)
@Value
(
"${gylyw.prod.ding.url}"
)
private
String
gylywProdDingUrl
;
private
String
gylywProdDingUrl
;
@Value
(
"${xfdtxs.prod.ding.url}"
)
private
String
xfdtxsProdDingUrl
;
@Autowired
@Autowired
UserPhoneMap
userPhoneMap
;
UserPhoneMap
userPhoneMap
;
...
@@ -83,7 +87,11 @@ public class WebhookServiceImpl implements WebhookService {
...
@@ -83,7 +87,11 @@ public class WebhookServiceImpl implements WebhookService {
// webhook赋值为电商群的机器人地址
// webhook赋值为电商群的机器人地址
webhook
=
dsProdDingUrl
;
webhook
=
dsProdDingUrl
;
}
else
if
(
StringUtils
.
equals
(
key
.
split
(
"-"
)[
0
],
"GYLYW"
))
{
}
else
if
(
StringUtils
.
equals
(
key
.
split
(
"-"
)[
0
],
"GYLYW"
))
{
// 供应链业务
webhook
=
gylywProdDingUrl
;
webhook
=
gylywProdDingUrl
;
}
else
if
(
StringUtils
.
equals
(
key
.
split
(
"-"
)[
0
],
"XFDTXS"
))
{
// 消费地图线上
webhook
=
xfdtxsProdDingUrl
;
}
else
if
(
StringUtils
.
equals
(
key
.
split
(
"-"
)[
0
],
"CSXT"
))
{
}
else
if
(
StringUtils
.
equals
(
key
.
split
(
"-"
)[
0
],
"CSXT"
))
{
webhook
=
"https://oapi.dingtalk.com/robot/send?access_token=be220b4bd17f311d70365a0ee81a659b54f06d52f1ee8d4d7d1051a183a266e1"
;
webhook
=
"https://oapi.dingtalk.com/robot/send?access_token=be220b4bd17f311d70365a0ee81a659b54f06d52f1ee8d4d7d1051a183a266e1"
;
}
}
...
...
src/main/java/cn/qg/holmes/task/BugNotifyTask.java
View file @
ef049708
...
@@ -56,6 +56,9 @@ public class BugNotifyTask {
...
@@ -56,6 +56,9 @@ public class BugNotifyTask {
@Value
(
"${gylyw.prod.ding.url}"
)
@Value
(
"${gylyw.prod.ding.url}"
)
private
String
gylywProdDingUrl
;
private
String
gylywProdDingUrl
;
@Value
(
"${xfdtxs.prod.ding.url}"
)
private
String
xfdtxsProdDingUrl
;
/**
/**
* 数据工单bug统计
* 数据工单bug统计
...
@@ -210,4 +213,16 @@ public class BugNotifyTask {
...
@@ -210,4 +213,16 @@ public class BugNotifyTask {
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildDailyProdBugNotifyMsgForBusiness
(
jrUnsolvedList
),
gylywProdDingUrl
);
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
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment