USVT-132 添加一个微信消息对象和测试方法
This commit is contained in:
parent
549f5f03a6
commit
050cedfc1d
|
@ -47,7 +47,18 @@ public class HomeController {
|
||||||
@Operation(summary = "Wechat Verification API", description = "Make sure the calling to this API come from WeChat")
|
@Operation(summary = "Wechat Verification API", description = "Make sure the calling to this API come from WeChat")
|
||||||
public String weChatMessage(@RequestBody String weChatMessage) {
|
public String weChatMessage(@RequestBody String weChatMessage) {
|
||||||
log.debug("Receive message from WeChat - [{}]", weChatMessage);
|
log.debug("Receive message from WeChat - [{}]", weChatMessage);
|
||||||
return weChatService.getWeChatMessage(weChatMessage);
|
String weChatMessageStr = weChatService.getWeChatMessage(weChatMessage);
|
||||||
|
log.debug("Response message to WeChat - [{}]",weChatMessageStr);
|
||||||
|
weChatMessageStr = "<xml><ToUserName><![CDATA[\n" +
|
||||||
|
" o9phd5jz_We8mPs1ovmyjud97Ock\n" +
|
||||||
|
" ]]></ToUserName><FromUserName><![CDATA[\n" +
|
||||||
|
" gh_f8d764e538eb\n" +
|
||||||
|
" ]]></FromUserName><CreateTime>1672943527158</CreateTime><MsgType><![CDATA[\n" +
|
||||||
|
" text\n" +
|
||||||
|
" ]]></MsgType><Content><![CDATA[VisaFn Response your message - \n" +
|
||||||
|
" this is a test - 你好\n" +
|
||||||
|
" ]]></Content></xml>";
|
||||||
|
return weChatMessageStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue