update:调整QQBot的返回值
This commit is contained in:
@@ -6,6 +6,7 @@ import com.yutou.qqbot.utlis.AppTools;
|
||||
import com.yutou.qqbot.utlis.HttpTools;
|
||||
import com.yutou.qqbot.utlis.RedisTools;
|
||||
import com.yutou.qqbot.utlis.StringUtils;
|
||||
import net.mamoe.mirai.message.MessageReceipt;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -63,7 +64,7 @@ public class AppController {
|
||||
@RequestMapping("/qq/send.do")
|
||||
public String sendQQ(@RequestBody JSONObject json) {
|
||||
File image = null;
|
||||
String ret;
|
||||
MessageReceipt<?> ret;
|
||||
if(json.getString("message").isEmpty()){
|
||||
return "not message";
|
||||
}
|
||||
@@ -76,7 +77,7 @@ public class AppController {
|
||||
} else {
|
||||
ret = QQBotManager.getInstance().sendMessage(json.getLong("qq"), json.getString("message"));
|
||||
}
|
||||
return ret;
|
||||
return ret==null?"message send fail":"message send success";
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
|
||||
Reference in New Issue
Block a user