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())) {
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
<!-- magenta:洋红 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="%yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%blue(%file:%line) |%cyan(%msg%n)"/>
|
||||
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
|
||||
Reference in New Issue
Block a user