You've already forked FrameTour-BE
98 lines
2.7 KiB
Java
98 lines
2.7 KiB
Java
package com.ycwl.basic.controller.mobile;
|
|
|
|
import com.ycwl.basic.annotation.IgnoreToken;
|
|
import com.ycwl.basic.model.mobile.weChat.DTO.WeChatUserInfoDTO;
|
|
import com.ycwl.basic.model.mobile.weChat.DTO.WeChatUserInfoUpdateDTO;
|
|
import com.ycwl.basic.model.pc.member.resp.MemberRespVO;
|
|
import com.ycwl.basic.service.mobile.AppMemberService;
|
|
import com.ycwl.basic.utils.ApiResponse;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/4 16:54
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/api/mobile/member/v1")
|
|
@Api(tags = "用户相关接口")
|
|
@Slf4j
|
|
public class AppMemberController {
|
|
|
|
@Autowired
|
|
private AppMemberService memberService;
|
|
|
|
/**
|
|
* 登录
|
|
*
|
|
* @param userInfoDTO
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
@ApiOperation("登录")
|
|
@PostMapping("/login")
|
|
@IgnoreToken
|
|
public ApiResponse<?> login(@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
|
return memberService.login(userInfoDTO.getCode(), userInfoDTO);
|
|
}
|
|
|
|
/**
|
|
* 获取用户信息
|
|
*
|
|
* @return
|
|
*/
|
|
@ApiOperation("获取用户信息")
|
|
@GetMapping("/getUserInfo")
|
|
public ApiResponse<MemberRespVO> getUserInfo() {
|
|
return memberService.getUserInfo();
|
|
}
|
|
|
|
/**
|
|
* 修改用户信息
|
|
*
|
|
* @param userInfoUpdateDTO
|
|
* @return
|
|
*/
|
|
@ApiOperation("修改用户信息")
|
|
@PostMapping("/update")
|
|
public ApiResponse<?> update(@RequestBody WeChatUserInfoUpdateDTO userInfoUpdateDTO) {
|
|
return memberService.update(userInfoUpdateDTO);
|
|
}
|
|
|
|
/**
|
|
* 同意用户协议
|
|
*
|
|
* @return
|
|
*/
|
|
@ApiOperation("同意用户协议")
|
|
@GetMapping("/agreement")
|
|
public ApiResponse<?> agreement() {
|
|
return memberService.agreement();
|
|
}
|
|
|
|
|
|
@ApiOperation("是否首次获取视频")
|
|
@GetMapping("/isFirstObtainVideo")
|
|
public ApiResponse isFirstTimeObtainingVideo() {
|
|
// TODO 判断是否首次获取视频逻辑
|
|
|
|
return ApiResponse.success("");
|
|
}
|
|
|
|
@ApiOperation("新增或修改景区服务通知状态")
|
|
@GetMapping("/updateScenicServiceNoticeStatus")
|
|
public ApiResponse updateScenicServiceNoticeStatus(Long scenicId) {
|
|
return memberService.updateScenicServiceNoticeStatus(scenicId);
|
|
}
|
|
|
|
@ApiOperation("查看景区服务通知状态 0关闭 1开启")
|
|
@GetMapping("/getScenicServiceNoticeStatus")
|
|
public ApiResponse<Integer> getScenicServiceNoticeStatus(Long scenicId) {
|
|
return memberService.getScenicServiceNoticeStatus(scenicId);
|
|
}
|
|
|
|
}
|