补充swagger注解
This commit is contained in:
parent
906f4fb3fa
commit
1a7b99515d
@ -20,6 +20,10 @@ import io.linfeng.modules.app.annotation.Login;
|
||||
import io.linfeng.modules.app.annotation.LoginUser;
|
||||
import io.linfeng.modules.app.form.AddThumbsForm;
|
||||
import io.linfeng.modules.app.service.CommentThumbsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -29,6 +33,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @date 2022/7/27 15:35
|
||||
*
|
||||
*/
|
||||
@Api(tags = "用户端——评论")
|
||||
@RestController
|
||||
@RequestMapping("app/comment")
|
||||
public class AppCommentController {
|
||||
@ -42,6 +47,11 @@ public class AppCommentController {
|
||||
* 评论列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("评论列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "postId", value = "帖子id", paramType = "query",dataType = "Integer", required = true),
|
||||
@ApiImplicitParam(name = "page", value = "分页页码",paramType = "query", dataType = "Integer", required = true)
|
||||
})
|
||||
public R list(@RequestParam("postId")Integer postId,@RequestParam("page")Integer page){
|
||||
AppPageUtils pages =commentService.queryCommentPage(postId,page);
|
||||
|
||||
@ -54,6 +64,7 @@ public class AppCommentController {
|
||||
*/
|
||||
@Login
|
||||
@PostMapping("/thumbs")
|
||||
@ApiOperation("评论区的点赞")
|
||||
public R thumbs(@RequestBody AddThumbsForm request, @LoginUser AppUserEntity user){
|
||||
|
||||
commentThumbsService.addThumbs(request,user);
|
||||
@ -65,6 +76,7 @@ public class AppCommentController {
|
||||
*/
|
||||
@Login
|
||||
@PostMapping("/cancelThumbs")
|
||||
@ApiOperation("取消评论区的点赞")
|
||||
public R cancelThumbs(@RequestBody AddThumbsForm request,@LoginUser AppUserEntity user){
|
||||
|
||||
commentThumbsService.cancelThumbs(request,user);
|
||||
|
@ -14,6 +14,8 @@ package io.linfeng.modules.app.controller;
|
||||
import io.linfeng.common.utils.R;
|
||||
import io.linfeng.modules.admin.entity.SystemEntity;
|
||||
import io.linfeng.modules.admin.service.SystemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -23,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author linfeng
|
||||
* @date 2022/8/17 12:07
|
||||
*/
|
||||
|
||||
@Api(tags = "用户端——系统配置")
|
||||
@RestController
|
||||
@RequestMapping("app/system")
|
||||
public class AppSystemConfigController {
|
||||
@ -31,6 +33,7 @@ public class AppSystemConfigController {
|
||||
@Autowired
|
||||
private SystemService systemService;
|
||||
|
||||
@ApiOperation("logo配置")
|
||||
@GetMapping("/miniConfig")
|
||||
public R miniConfig(){
|
||||
SystemEntity system = systemService.lambdaQuery()
|
||||
|
Loading…
Reference in New Issue
Block a user