修复QQ接口无法使用的问题

This commit is contained in:
Yutousama 2022-01-16 12:31:39 +08:00
parent b5076323d7
commit 5fa740c58f
3 changed files with 6 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import com.yutou.qqbot.utlis.AppTools;
import com.yutou.qqbot.utlis.HttpTools;
import com.yutou.qqbot.utlis.RedisTools;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@ -54,7 +55,7 @@ public class AppController {
@ResponseBody
@RequestMapping("/qq/send.do")
public String sendQQ(JSONObject json) {
public String sendQQ(@RequestBody JSONObject json) {
File image = null;
String ret;
if (json.containsKey("image")) {

View File

@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class QQBotApplication {
public static final String version="QQBot v.1.2.7.1";
public static final String version="QQBot v.1.2.7.2";
public static void main(String[] args) {
System.out.println("version = " + version);
SpringApplication.run(QQBotApplication.class, args);

View File

@ -4,9 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.digest.DigestUtils;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
public class XiaoMiRouter {
private final static String key = "a2ffa5c9be07488bbb04a3a47d3c5f6a";
@ -44,6 +41,8 @@ public class XiaoMiRouter {
}
public static void main(String[] args) {
String url = XiaoMiRouter.getDeviceListUrl();
JSONObject json = JSONObject.parseObject(HttpTools.get(url));
System.out.println("json = " + json);
}
}