| 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.business.model.Visits; | 
| import com.doumee.dao.web.reqeust.CheckVisitedDTO; | 
| import com.doumee.dao.web.response.MemberVO; | 
| import com.doumee.dao.web.response.WxAuthorizeVO; | 
| import com.doumee.service.business.MemberService; | 
| import com.doumee.service.business.VisitsService; | 
| 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.checkerframework.checker.units.qual.A; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.web.bind.annotation.*; | 
|   | 
| import javax.validation.Valid; | 
|   | 
| /** | 
|  * 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; | 
|   | 
|     @Autowired | 
|     private VisitsService visitsService; | 
|   | 
|   | 
|     @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); | 
|     } | 
|   | 
|   | 
|     @ApiOperation(value = "查询被访问人信息", notes = "查询被访问人信息") | 
|     @PostMapping("/getVisitedMember") | 
|     public ApiResponse<MemberVO> getVisitedMember(@Valid @RequestBody CheckVisitedDTO checkVisitedDTO) { | 
|         return ApiResponse.success("查询成功", memberService.getVisitedMember(checkVisitedDTO)); | 
|     } | 
|   | 
|   | 
|     @ApiOperation(value = "访客记录提交", notes = "访客记录提交") | 
|     @PostMapping("/createFk") | 
|     public ApiResponse createFk(@RequestBody Visits visits) { | 
|         return ApiResponse.success("查询成功", visitsService.createFk(visits)); | 
|     } | 
|   | 
|   | 
| } |