From 7ccb8522234c68110378d0bc13d404936d46d17f Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 13 Oct 2022 23:22:05 +0800 Subject: [PATCH] update qq --- src/main/java/com/yutou/nas/utils/BTDownloadManager.java | 4 ++-- src/main/java/com/yutou/nas/utils/QQBotManager.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java index acd20d4..c79a32b 100644 --- a/src/main/java/com/yutou/nas/utils/BTDownloadManager.java +++ b/src/main/java/com/yutou/nas/utils/BTDownloadManager.java @@ -124,9 +124,9 @@ public class BTDownloadManager { JSONObject item = JSON.parseObject(map); String text="添加到库:"+item.getString("title")+"\n大妈之家地址:"+item.getString("link"); if (item.containsKey("thumbnail")) { - QQBotManager.getInstance().sendMessage(text); + QQBotManager.getInstance().sendMessage(734332887,text); } else { - QQBotManager.getInstance().sendMessage(item.getString("thumbnail"),text); + QQBotManager.getInstance().sendMessage(734332887,item.getString("thumbnail"),text); } } } diff --git a/src/main/java/com/yutou/nas/utils/QQBotManager.java b/src/main/java/com/yutou/nas/utils/QQBotManager.java index 71a84e2..4c2d756 100644 --- a/src/main/java/com/yutou/nas/utils/QQBotManager.java +++ b/src/main/java/com/yutou/nas/utils/QQBotManager.java @@ -47,10 +47,12 @@ public class QQBotManager { return HttpTools.http_post("http://192.168.31.88:802/qq/send.do", json.toString().getBytes(StandardCharsets.UTF_8), 1, header); } - public String sendMessage(String imageUrl, String message) { + return sendMessage(891655174,imageUrl,message); + } + public String sendMessage(long qq,String imageUrl, String message) { JSONObject json = new JSONObject(); - json.put("qq", 891655174); + json.put("qq", qq); json.put("message",message); json.put("image", imageUrl); Map header = new HashMap<>();