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));
|
}
|
|
|
}
|