|
|
|
@@ -25,15 +25,10 @@ public class WechatCalllbackController extends BaseController { |
|
|
|
protected WxOpenService wxOpenService; |
|
|
|
|
|
|
|
@RequestMapping("/notify") |
|
|
|
public Object receiveTicket(HttpServletRequest request) throws IOException { |
|
|
|
logger.info("[" +getIpAddr() + "]接收微信请求"); |
|
|
|
InputStream inStream = request.getInputStream(); |
|
|
|
byte[] buffer = new byte[1024]; |
|
|
|
int len = 0; |
|
|
|
while ((len = inStream.read(buffer)) != -1) { |
|
|
|
logger.debug(buffer.toString()); |
|
|
|
} |
|
|
|
/* |
|
|
|
public Object receiveTicket(@RequestBody(required = false) String requestBody, @RequestParam("timestamp") String timestamp, |
|
|
|
@RequestParam("nonce") String nonce, @RequestParam("signature") String signature, |
|
|
|
@RequestParam(name = "encrypt_type", required = false) String encType, |
|
|
|
@RequestParam(name = "msg_signature", required = false) String msgSignature) { |
|
|
|
logger.info( |
|
|
|
"\n接收微信请求:[signature=[{}], encType=[{}], msgSignature=[{}]," |
|
|
|
+ " timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] ", |
|
|
|
@@ -54,12 +49,11 @@ public class WechatCalllbackController extends BaseController { |
|
|
|
} catch (WxErrorException e) { |
|
|
|
this.logger.error("notify", e); |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
return "success"; |
|
|
|
} |
|
|
|
|
|
|
|
@RequestMapping("callback/{appId}") |
|
|
|
@RequestMapping("/{appId}/callback") |
|
|
|
public Object callback(@RequestBody(required = false) String requestBody, |
|
|
|
@PathVariable("appId") String appId, |
|
|
|
@RequestParam("signature") String signature, |
|
|
|
|