记得上下班打卡 | git大法好,push需谨慎

Commit 51cf6058 authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_20111115' into dev_20111115

parents 1cb41705 0cc231bb
......@@ -37,7 +37,7 @@ public class SweetWechatApplyEventPushController {
return pushService.authGet(type, timestamp, nonce, signature, echostr);
}
// @PostMapping(produces = "application/xml; charset=UTF-8")
// @PostMapping(value = "{type}", produces = "application/xml; charset=UTF-8")
@PostMapping("{type}")
@ApiOperation("用户动作回调")
public String post(
......
......@@ -45,13 +45,17 @@ public class SweetWechatApplyEventPushServiceImpl {
final boolean isJson = Objects.equals(wxService.getWxMaConfig().getMsgDataFormat(),
WxMaConstants.MsgDataFormat.JSON);
log.info("isJson{}",isJson);
if (StringUtils.isBlank(encryptType)) {
// 明文传输的消息
WxMaMessage inMessage;
if (isJson) {
log.info("Json{}",requestBody);
inMessage = WxMaMessage.fromJson(requestBody);
} else {//xml
log.info("xml{}",requestBody);
inMessage = WxMaMessage.fromXml(requestBody);
log.info("inMessage{}",inMessage);
}
wechatMaConfigure.messageRouter(type).route(inMessage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment