linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
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
package org.springblade.modules.wechat.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.modules.pay.entity.WeChatMiniAuthorizeVo;
import org.springblade.modules.wechat.service.WechatService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
@Slf4j
@RestController
@RequestMapping("blade-wechat/wechat/")
@Api(tags = "用户 -- 登录注册")
public class WechatController {
    @Resource
    private WechatService wechatService;
 
    @ApiOperation(value = "微信小程序授权")
    @RequestMapping(value = "/getOpenId", method = RequestMethod.GET)
    public R<WeChatMiniAuthorizeVo> wechatRoutineLogin(String code) throws Exception {
        return R.data(wechatService.miniAuthCode(code));
    }
 
 
}