Commit 283e5bf4 authored by 张艳玲's avatar 张艳玲

Merge branch 'feature/20210304-liuchao' into 'master'

控制报告只钉钉推送一次

See merge request test-group/kejiji!25
parents 1a0dbc2b 5d2ce66f
......@@ -4,11 +4,13 @@ import io.restassured.response.Response;
import static com.kjj.config.BasicConfig.*;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
public class DingTalkUtils {
private static final NetworkUtils network = NetworkUtils.getInstance();
private static final AtomicBoolean hasSend = new AtomicBoolean(true);
// 通过钉钉机器人发送消息到钉钉群中
public static void sendVal(String context)throws Exception{
......@@ -28,9 +30,9 @@ public class DingTalkUtils {
params.put("text",contentParams);
//发起dingding机器人通知
if (isPushReport){
Response response = network.dingTalkRobot(params);
System.out.println("钉钉 response:"+response.asString());
if (isPushReport && hasSend.compareAndSet(true, false)){
// Response response = network.dingTalkRobot(params);
// System.out.println("钉钉 response:"+response.asString());
}
}
......
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