chengf
2025-10-28 2807cca4b6f2e8af204d798679dcee78e695ee28
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
30
31
32
33
34
35
36
37
38
package com.ruoyi.business.appuser.controller;
 
import com.ruoyi.business.appuser.service.WeiXinMpService;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 微信公众号控制器
 *
 * @author Tellsea
 * @date 2022/9/6
 */
@Api("微信公众号控制器")
@RestController
@RequestMapping("/au/weiXinMp")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class WeiXinMpController {
 
    private final WeiXinMpService weiXinMpService;
 
    @ApiOperation("获取授权登录Url")
    @GetMapping("getLoginUrl")
    public AjaxResult getLoginUrl() {
        return AjaxResult.success("操作成功", weiXinMpService.getLoginUrl());
    }
 
    @ApiOperation("登录回调")
    @RequestMapping("callback")
    public void callback() {
        weiXinMpService.callback();
    }
}