1
This commit is contained in:
@@ -11,10 +11,7 @@ import cn.van333.wxsend.util.WxSendUtil;
|
||||
import cn.van333.wxsend.util.request.MessageRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author Leo
|
||||
@@ -50,13 +47,19 @@ public class WXController {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 会获取不到vanToken 和 touser
|
||||
* @param message
|
||||
* @return cn.van333.wxsend.business.model.R
|
||||
* @throws
|
||||
* */
|
||||
@RequestMapping(value = "/send/ql")
|
||||
@ResponseBody
|
||||
@RateLimiter(time = 5, count = 60)
|
||||
public R sendToQL(@RequestBody MessageRequest message) throws Exception {
|
||||
public R sendToQL(@RequestParam("token") String vanToken,@RequestBody MessageRequest message) throws Exception {
|
||||
logger.info(message.toString());
|
||||
|
||||
if (!TokenUtil.checkToken(message.getVanToken())) {
|
||||
if (!TokenUtil.checkToken(vanToken)) {
|
||||
return R.error("vanToken无效");
|
||||
}
|
||||
if (!StrUtil.isAllNotEmpty(message.getTitle(), message.getText())) {
|
||||
|
||||
Reference in New Issue
Block a user