接口文档整理

This commit is contained in:
hupeng
2019-12-29 13:50:54 +08:00
parent 37fd174b7b
commit 16461bd97a
38 changed files with 280 additions and 293 deletions

View File

@ -1,6 +1,7 @@
package co.yixiang.modules.monitor.rest;
import co.yixiang.annotation.Limit;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -11,6 +12,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*
* 接口限流测试类
*/
@Api(tags = "接口限流测试类")
@RestController
@RequestMapping("api")
public class LimitController {

View File

@ -6,6 +6,7 @@ import co.yixiang.exception.BadRequestException;
import co.yixiang.modules.monitor.service.RedisService;
import co.yixiang.aop.log.Log;
import co.yixiang.modules.monitor.domain.vo.RedisVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
* @author Zheng Jie
* @date 2018-12-10
*/
@Api(tags = "redis缓存管理")
@RestController
@RequestMapping("api")
public class RedisController {

View File

@ -2,6 +2,7 @@ package co.yixiang.modules.monitor.rest;
import co.yixiang.utils.RequestHolder;
import co.yixiang.modules.monitor.service.VisitsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -14,6 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author Zheng Jie
* @date 2018-12-13
*/
@Api(tags = "访问统计")
@RestController
@RequestMapping("api")
public class VisitsController {

View File

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import co.yixiang.exception.BadRequestException;
import co.yixiang.modules.quartz.domain.QuartzJob;
import co.yixiang.modules.quartz.service.QuartzJobService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import co.yixiang.aop.log.Log;
import co.yixiang.modules.quartz.service.dto.JobQueryCriteria;
@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@RequestMapping("/api")
@Api(tags = "定时任务")
public class QuartzJobController {
private static final String ENTITY_NAME = "quartzJob";

View File

@ -12,6 +12,7 @@ import co.yixiang.modules.security.utils.VerifyCodeUtils;
import co.yixiang.utils.EncryptUtils;
import co.yixiang.utils.SecurityUtils;
import co.yixiang.utils.StringUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import co.yixiang.aop.log.Log;
import co.yixiang.modules.security.security.ImgResult;
@ -35,6 +36,7 @@ import java.io.IOException;
@Slf4j
@RestController
@RequestMapping("auth")
@Api(tags = "认证模块")
public class AuthenticationController {
@Value("${jwt.header}")

View File

@ -8,6 +8,7 @@ import co.yixiang.modules.system.domain.Dept;
import co.yixiang.modules.system.service.DeptService;
import co.yixiang.modules.system.service.dto.DeptDTO;
import co.yixiang.modules.system.service.dto.DeptQueryCriteria;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -22,6 +23,7 @@ import java.util.List;
*/
@RestController
@RequestMapping("api")
@Api(tags = "部门管理")
public class DeptController {
@Autowired

View File

@ -6,6 +6,7 @@ import co.yixiang.aop.log.Log;
import co.yixiang.modules.system.domain.Dict;
import co.yixiang.modules.system.service.DictService;
import co.yixiang.modules.system.service.dto.DictQueryCriteria;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping("api")
@Api(tags = "字典管理")
public class DictController {
@Autowired

View File

@ -6,6 +6,7 @@ import co.yixiang.aop.log.Log;
import co.yixiang.modules.system.domain.DictDetail;
import co.yixiang.modules.system.service.DictDetailService;
import co.yixiang.modules.system.service.dto.DictDetailQueryCriteria;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
@ -25,6 +26,7 @@ import java.util.Map;
*/
@RestController
@RequestMapping("api")
@Api(tags = "字典明细管理")
public class DictDetailController {
@Autowired

View File

@ -7,6 +7,7 @@ import co.yixiang.aop.log.Log;
import co.yixiang.modules.system.domain.Job;
import co.yixiang.modules.system.service.JobService;
import co.yixiang.modules.system.service.dto.JobQueryCriteria;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
*/
@RestController
@RequestMapping("api")
@Api(tags = "任务管理")
public class JobController {
@Autowired

View File

@ -12,6 +12,7 @@ import co.yixiang.modules.system.service.UserService;
import co.yixiang.modules.system.service.dto.MenuDTO;
import co.yixiang.modules.system.service.dto.MenuQueryCriteria;
import co.yixiang.modules.system.service.dto.UserDTO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -28,6 +29,7 @@ import java.util.Set;
*/
@RestController
@RequestMapping("api")
@Api(tags = "菜单管理")
public class MenuController {
@Autowired

View File

@ -9,6 +9,7 @@ import co.yixiang.modules.system.service.PermissionService;
import co.yixiang.modules.system.service.dto.PermissionDTO;
import co.yixiang.modules.system.service.dto.PermissionQueryCriteria;
import co.yixiang.modules.system.service.mapper.PermissionMapper;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -26,6 +27,7 @@ import java.util.Set;
*/
@RestController
@RequestMapping("api")
@Api(tags = "权限管理")
public class PermissionController {
@Autowired

View File

@ -11,6 +11,7 @@ import co.yixiang.modules.system.domain.Role;
import co.yixiang.modules.system.service.RoleService;
import co.yixiang.modules.system.service.dto.RoleQueryCriteria;
import co.yixiang.modules.system.service.dto.RoleSmallDTO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
@ -30,6 +31,7 @@ import java.util.stream.Collectors;
*/
@RestController
@RequestMapping("api")
@Api(tags = "角色管理")
public class RoleController {
@Autowired

View File

@ -20,6 +20,7 @@ import co.yixiang.modules.system.service.dto.RoleSmallDTO;
import co.yixiang.modules.system.service.dto.UserQueryCriteria;
import co.yixiang.utils.*;
import co.yixiang.modules.system.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
@ -42,6 +43,7 @@ import java.util.stream.Collectors;
*/
@RestController
@RequestMapping("api")
@Api(tags = "系统用户管理")
public class UserController {
@Autowired