swagger文档完善
This commit is contained in:
parent
d69f465e60
commit
080d91d65d
@ -27,6 +27,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -110,7 +111,7 @@ public class AppUserInfoController {
|
|||||||
@Login
|
@Login
|
||||||
@GetMapping("/userInfo")
|
@GetMapping("/userInfo")
|
||||||
@ApiOperation("获取用户信息")
|
@ApiOperation("获取用户信息")
|
||||||
public R userInfo(@LoginUser AppUserEntity user) {
|
public R userInfo(@ApiIgnore @LoginUser AppUserEntity user) {
|
||||||
|
|
||||||
AppUserResponse response = appUserService.getUserInfo(user);
|
AppUserResponse response = appUserService.getUserInfo(user);
|
||||||
return R.ok().put("result", response);
|
return R.ok().put("result", response);
|
||||||
@ -119,7 +120,8 @@ public class AppUserInfoController {
|
|||||||
@Login
|
@Login
|
||||||
@PostMapping("/cancelFollow")
|
@PostMapping("/cancelFollow")
|
||||||
@ApiOperation("取消关注用户")
|
@ApiOperation("取消关注用户")
|
||||||
public R cancelFollow(@LoginUser AppUserEntity user, @RequestBody AddFollowForm request) {
|
public R cancelFollow(@ApiIgnore @LoginUser AppUserEntity user,
|
||||||
|
@RequestBody AddFollowForm request) {
|
||||||
appUserService.cancelFollow(request, user);
|
appUserService.cancelFollow(request, user);
|
||||||
return R.ok("取消关注用户成功");
|
return R.ok("取消关注用户成功");
|
||||||
}
|
}
|
||||||
@ -156,7 +158,8 @@ public class AppUserInfoController {
|
|||||||
@Login
|
@Login
|
||||||
@GetMapping("/follow")
|
@GetMapping("/follow")
|
||||||
@ApiOperation("我的关注分页列表")
|
@ApiOperation("我的关注分页列表")
|
||||||
public R follow(@RequestParam("page") Integer page, @LoginUser AppUserEntity user) {
|
public R follow(@RequestParam("page") Integer page,
|
||||||
|
@ApiIgnore @LoginUser AppUserEntity user) {
|
||||||
|
|
||||||
AppPageUtils pages = appUserService.follow(page, user);
|
AppPageUtils pages = appUserService.follow(page, user);
|
||||||
return R.ok().put("result", pages);
|
return R.ok().put("result", pages);
|
||||||
@ -166,7 +169,8 @@ public class AppUserInfoController {
|
|||||||
@Login
|
@Login
|
||||||
@PostMapping("/userInfoById")
|
@PostMapping("/userInfoById")
|
||||||
@ApiOperation("用户个人主页信息")
|
@ApiOperation("用户个人主页信息")
|
||||||
public R userInfoById(@RequestBody AppUserInfoForm request, @LoginUser AppUserEntity user) {
|
public R userInfoById(@RequestBody AppUserInfoForm request,
|
||||||
|
@ApiIgnore @LoginUser AppUserEntity user) {
|
||||||
AppUserInfoResponse response = appUserService.findUserInfoById(request.getUid(), user);
|
AppUserInfoResponse response = appUserService.findUserInfoById(request.getUid(), user);
|
||||||
|
|
||||||
return R.ok().put("result", response);
|
return R.ok().put("result", response);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user