package com.ruoyi.system.controller.conslole;
|
|
import com.esotericsoftware.minlog.Log;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.apache.commons.io.IOUtils;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
|
/**
|
* @ClassName QYWXCallBackController
|
* @Description TODO
|
* @Author jqs
|
* @Date 2023/8/16 16:56
|
* @Version 1.0
|
*/
|
@Api(value = "企业微信通知控制", tags = "企业微信通知控制", description = "企业微信通知控制")
|
@RestController
|
@RequestMapping("/qywx")
|
public class QYWXCallBackController {
|
|
|
@ApiOperation(value = "消息与事件接收配置")
|
@RequestMapping(value = "/qywxNotify",
|
method = RequestMethod.POST,consumes = "text/xml",produces = "text/xml;charset=utf-8")
|
public String wechatPlatformEvent(@PathVariable String APPID,
|
HttpServletRequest request,
|
HttpServletResponse response
|
) throws Exception {
|
String nonce = request.getParameter("nonce");
|
String timestamp = request.getParameter("timestamp");
|
String signature = request.getParameter("signature");
|
String msgSignature = request.getParameter("msg_signature");
|
String encType = request.getParameter("encrypt_type");
|
String xml = IOUtils.toString(request.getReader());
|
Log.info("企业微信回调"+xml);
|
return "SUCCESS";
|
}
|
}
|