jiaosong
2023-12-07 657d75ff683ef35003bedd64a0fa420e7d294f85
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
39
40
41
42
43
44
45
46
47
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);
    }
 
 
}