浏览代码

钉钉预警直接跳转百度

wukai 1 年之前
父节点
当前提交
e00c10564c
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      dayun-admin/src/main/java/com/jjt/biz/service/DingTalkService.java

+ 1 - 6
dayun-admin/src/main/java/com/jjt/biz/service/DingTalkService.java

@@ -90,12 +90,7 @@ public class DingTalkService {
             markdown.setTitle("恶意动态预警");
             markdown.setTitle("恶意动态预警");
             String text = "###恶意动态预警\n";
             String text = "###恶意动态预警\n";
             for (Map<String, Object> wsMap : list) {
             for (Map<String, Object> wsMap : list) {
-                String msgUrl = accessURL + "?t=" + timestamp;
-                msgUrl += "&type=" + wsMap.get("type");
-                msgUrl += "&name=" + URLEncoder.encode((String) wsMap.get("name"), "utf-8");
-                msgUrl += "&keyword=" + URLEncoder.encode((String) wsMap.get("keyword"), "utf-8");
-                Date time = (Date) wsMap.get("time");
-                msgUrl += "&time=" + time.getTime();
+                String msgUrl = "http://api.map.baidu.com/marker?location=" + wsMap.get("lat") + "," + wsMap.get("lng") + "&title=恶意" + wsMap.get("type") + "&content=信息地址&output=html";
                 text += "> 发现类型为”" + wsMap.get("keyword") + "“的恶意" + wsMap.get("type") + "\t[位置](" + msgUrl + ") \n\n";
                 text += "> 发现类型为”" + wsMap.get("keyword") + "“的恶意" + wsMap.get("type") + "\t[位置](" + msgUrl + ") \n\n";
             }
             }
             System.err.println(text);
             System.err.println(text);