package com.qianwen.smartman.modules.sync.controller;
|
|
import com.qianwen.smartman.modules.sync.service.IWechatCallbackService;
|
import com.qianwen.smartman.modules.sync.vo.WechatCallbackVO;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@RequestMapping({"blade-sync/event"})
|
@RestController
|
public class QyWechatEventCallBackController {
|
private final IWechatCallbackService wechatCallbackService;
|
|
public QyWechatEventCallBackController(final IWechatCallbackService wechatCallbackService) {
|
this.wechatCallbackService = wechatCallbackService;
|
}
|
|
@GetMapping({"/callback"})
|
public String callbackVerifyUrl(WechatCallbackVO callbackVO) {
|
return this.wechatCallbackService.callbackVerifyUrl(callbackVO);
|
}
|
|
@PostMapping({"/callback"})
|
public String callbackEvent(WechatCallbackVO callbackVO, @RequestBody String xmlData) {
|
return this.wechatCallbackService.callbackEvent(callbackVO, xmlData);
|
}
|
}
|