Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
龚小红
oto
Commits
5d2ce66f
Commit
5d2ce66f
authored
Mar 04, 2021
by
liuchao1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控制报告只钉钉推送一次
parent
1a0dbc2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
DingTalkUtils.java
src/test/java/com/kjj/utils/DingTalkUtils.java
+5
-3
No files found.
src/test/java/com/kjj/utils/DingTalkUtils.java
View file @
5d2ce66f
...
@@ -4,11 +4,13 @@ import io.restassured.response.Response;
...
@@ -4,11 +4,13 @@ import io.restassured.response.Response;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicBoolean
;
public
class
DingTalkUtils
{
public
class
DingTalkUtils
{
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
private
static
final
AtomicBoolean
hasSend
=
new
AtomicBoolean
(
true
);
// 通过钉钉机器人发送消息到钉钉群中
// 通过钉钉机器人发送消息到钉钉群中
public
static
void
sendVal
(
String
context
)
throws
Exception
{
public
static
void
sendVal
(
String
context
)
throws
Exception
{
...
@@ -28,9 +30,9 @@ public class DingTalkUtils {
...
@@ -28,9 +30,9 @@ public class DingTalkUtils {
params
.
put
(
"text"
,
contentParams
);
params
.
put
(
"text"
,
contentParams
);
//发起dingding机器人通知
//发起dingding机器人通知
if
(
isPushReport
){
if
(
isPushReport
&&
hasSend
.
compareAndSet
(
true
,
false
)
){
Response
response
=
network
.
dingTalkRobot
(
params
);
//
Response response = network.dingTalkRobot(params);
System
.
out
.
println
(
"钉钉 response:"
+
response
.
asString
());
//
System.out.println("钉钉 response:"+response.asString());
}
}
}
}
...
...
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