修复QQ接口无法使用的问题
This commit is contained in:
parent
b5076323d7
commit
5fa740c58f
@ -6,6 +6,7 @@ import com.yutou.qqbot.utlis.AppTools;
|
|||||||
import com.yutou.qqbot.utlis.HttpTools;
|
import com.yutou.qqbot.utlis.HttpTools;
|
||||||
import com.yutou.qqbot.utlis.RedisTools;
|
import com.yutou.qqbot.utlis.RedisTools;
|
||||||
import org.springframework.stereotype.Controller;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
@ -54,7 +55,7 @@ public class AppController {
|
|||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/qq/send.do")
|
@RequestMapping("/qq/send.do")
|
||||||
public String sendQQ(JSONObject json) {
|
public String sendQQ(@RequestBody JSONObject json) {
|
||||||
File image = null;
|
File image = null;
|
||||||
String ret;
|
String ret;
|
||||||
if (json.containsKey("image")) {
|
if (json.containsKey("image")) {
|
||||||
|
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class QQBotApplication {
|
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) {
|
public static void main(String[] args) {
|
||||||
System.out.println("version = " + version);
|
System.out.println("version = " + version);
|
||||||
SpringApplication.run(QQBotApplication.class, args);
|
SpringApplication.run(QQBotApplication.class, args);
|
||||||
|
@ -4,9 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
public class XiaoMiRouter {
|
public class XiaoMiRouter {
|
||||||
private final static String key = "a2ffa5c9be07488bbb04a3a47d3c5f6a";
|
private final static String key = "a2ffa5c9be07488bbb04a3a47d3c5f6a";
|
||||||
@ -44,6 +41,8 @@ public class XiaoMiRouter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
String url = XiaoMiRouter.getDeviceListUrl();
|
||||||
|
JSONObject json = JSONObject.parseObject(HttpTools.get(url));
|
||||||
|
System.out.println("json = " + json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user