You've already forked FrameTour-BE
微信支付、回调、订单查询;
微信用户登录、用户信息查询、修改用户信息、同意用户协议; 文件OSS上传、删除接口;
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
package com.ycwl.basic.controller.mobile;
|
||||
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.model.mobile.DTO.WeChatUserInfoDTO;
|
||||
import com.ycwl.basic.model.mobile.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 org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
@ -15,30 +19,67 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/member/v1")
|
||||
@Api(tags = "用户相关接口")
|
||||
@Slf4j
|
||||
public class AppMemberController {
|
||||
|
||||
@Autowired
|
||||
private AppMemberService memberService;
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*
|
||||
* @param code
|
||||
* @param userInfoDTO
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation("登录")
|
||||
@PostMapping("/login")
|
||||
public ApiResponse login() {
|
||||
//TODO 登录逻辑
|
||||
return ApiResponse.success("");
|
||||
}
|
||||
|
||||
@PostMapping("/register")
|
||||
public ApiResponse register() {
|
||||
//TODO 注册逻辑
|
||||
return ApiResponse.success("");
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> login(@RequestParam(value = "code", required = false) String code,
|
||||
@RequestParam(value = "userInfoDTO", required = false) WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(code, userInfoDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取用户信息")
|
||||
@GetMapping("/getUserInfo")
|
||||
public ApiResponse getUserInfo() {
|
||||
//TODO 获取用户信息逻辑
|
||||
return ApiResponse.success("");
|
||||
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 判断是否首次获取视频逻辑
|
||||
// TODO 判断是否首次获取视频逻辑
|
||||
|
||||
return ApiResponse.success("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user