yangys
2024-05-07 ec2552d891e163bd9054e0554188afc575bcdb70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
    }
}