package com.doumee.api.web;
|
|
import com.doumee.core.annotation.trace.Trace;
|
import com.doumee.core.model.ApiResponse;
|
import com.doumee.core.utils.Constants;
|
import com.doumee.dao.web.response.WxAuthorizeVO;
|
import com.doumee.service.business.MemberService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
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.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* Created by IntelliJ IDEA.
|
*
|
* @Author : Rk
|
* @create 2023/12/7 10:40
|
*/
|
|
@Api(tags = "1、访客业务")
|
@Trace(exclude = true)
|
@RestController
|
@RequestMapping("/web/visitor")
|
@Slf4j
|
public class VisitorController {
|
|
@Autowired
|
private MemberService memberService;
|
|
@ApiOperation(value = "访客微信授权", notes = "访客微信授权获取openId")
|
@GetMapping("/wxAuthorize")
|
@ApiImplicitParams({
|
@ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "授权码", required = true)
|
})
|
public ApiResponse<WxAuthorizeVO> wxAuthorize(@RequestParam String code) {
|
WxAuthorizeVO wxAuthorizeVO = memberService.wxAuthorize(code);
|
return ApiResponse.success("查询成功",wxAuthorizeVO);
|
}
|
|
|
}
|