mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
add 整合 springdoc-openapi-javadoc 基于代码注释生成文档
This commit is contained in:
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.email.MailUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -26,7 +25,6 @@ import java.io.File;
|
||||
@RequestMapping("/demo/mail")
|
||||
public class MailController {
|
||||
|
||||
@Operation(summary = "发送邮件")
|
||||
@GetMapping("/sendSimpleMessage")
|
||||
public R<Void> sendSimpleMessage(@Parameter(name = "接收人") String to,
|
||||
@Parameter(name = "标题") String subject,
|
||||
@ -35,7 +33,6 @@ public class MailController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "发送邮件(带附件)")
|
||||
@GetMapping("/sendMessageWithAttachment")
|
||||
public R<Void> sendMessageWithAttachment(@Parameter(name = "接收人") String to,
|
||||
@Parameter(name = "标题") String subject,
|
||||
|
@ -41,7 +41,6 @@ public class RedisCacheController {
|
||||
* <p>
|
||||
* cacheNames 为配置文件内 groupId
|
||||
*/
|
||||
@Operation(summary = "测试 @Cacheable")
|
||||
@Cacheable(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
|
||||
@GetMapping("/test1")
|
||||
public R<String> test1(String key, String value) {
|
||||
@ -56,7 +55,6 @@ public class RedisCacheController {
|
||||
* <p>
|
||||
* cacheNames 为 配置文件内 groupId
|
||||
*/
|
||||
@Operation(summary = "测试 @CachePut")
|
||||
@CachePut(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
|
||||
@GetMapping("/test2")
|
||||
public R<String> test2(String key, String value) {
|
||||
@ -71,7 +69,6 @@ public class RedisCacheController {
|
||||
* <p>
|
||||
* cacheNames 为 配置文件内 groupId
|
||||
*/
|
||||
@Operation(summary = "测试 @CacheEvict")
|
||||
@CacheEvict(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
|
||||
@GetMapping("/test3")
|
||||
public R<String> test3(String key, String value) {
|
||||
@ -83,7 +80,6 @@ public class RedisCacheController {
|
||||
* 手动设置过期时间10秒
|
||||
* 11秒后获取 判断是否相等
|
||||
*/
|
||||
@Operation(summary = "测试设置过期时间")
|
||||
@GetMapping("/test6")
|
||||
public R<Boolean> test6(String key, String value) {
|
||||
RedisUtils.setCacheObject(key, value);
|
||||
|
@ -5,7 +5,6 @@ import com.baomidou.lock.LockTemplate;
|
||||
import com.baomidou.lock.annotation.Lock4j;
|
||||
import com.baomidou.lock.executor.RedissonLockExecutor;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -33,7 +32,6 @@ public class RedisLockController {
|
||||
/**
|
||||
* 测试lock4j 注解
|
||||
*/
|
||||
@Operation(summary = "测试lock4j 注解")
|
||||
@Lock4j(keys = {"#key"})
|
||||
@GetMapping("/testLock4j")
|
||||
public R<String> testLock4j(String key, String value) {
|
||||
@ -50,7 +48,6 @@ public class RedisLockController {
|
||||
/**
|
||||
* 测试lock4j 工具
|
||||
*/
|
||||
@Operation(summary = "测试lock4j 工具")
|
||||
@GetMapping("/testLock4jLockTemplate")
|
||||
public R<String> testLock4jLockTemplate(String key, String value) {
|
||||
final LockInfo lockInfo = lockTemplate.lock(key, 30000L, 5000L, RedissonLockExecutor.class);
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.redis.RedisUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -21,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/demo/redis/pubsub")
|
||||
public class RedisPubSubController {
|
||||
|
||||
@Operation(summary = "发布消息")
|
||||
@GetMapping("/pub")
|
||||
public R<Void> pub(@Parameter(name = "通道Key") String key, @Parameter(name = "发送内容") String value) {
|
||||
RedisUtils.publish(key, value, consumer -> {
|
||||
@ -30,7 +28,6 @@ public class RedisPubSubController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "订阅消息")
|
||||
@GetMapping("/sub")
|
||||
public R<Void> sub(@Parameter(name = "通道Key") String key) {
|
||||
RedisUtils.subscribe(key, String.class, msg -> {
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.demo.controller;
|
||||
import com.ruoyi.common.annotation.RateLimiter;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.LimitType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -26,7 +25,6 @@ public class RedisRateLimiterController {
|
||||
* 测试全局限流
|
||||
* 全局影响
|
||||
*/
|
||||
@Operation(summary = "测试全局限流")
|
||||
@RateLimiter(count = 2, time = 10)
|
||||
@GetMapping("/test")
|
||||
public R<String> test(String value) {
|
||||
@ -37,7 +35,6 @@ public class RedisRateLimiterController {
|
||||
* 测试请求IP限流
|
||||
* 同一IP请求受影响
|
||||
*/
|
||||
@Operation(summary = "测试请求IP限流")
|
||||
@RateLimiter(count = 2, time = 10, limitType = LimitType.IP)
|
||||
@GetMapping("/testip")
|
||||
public R<String> testip(String value) {
|
||||
@ -48,7 +45,6 @@ public class RedisRateLimiterController {
|
||||
* 测试集群实例限流
|
||||
* 启动两个后端服务互不影响
|
||||
*/
|
||||
@Operation(summary = "测试集群实例限流")
|
||||
@RateLimiter(count = 2, time = 10, limitType = LimitType.CLUSTER)
|
||||
@GetMapping("/testcluster")
|
||||
public R<String> testcluster(String value) {
|
||||
|
@ -4,7 +4,6 @@ import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.sms.config.properties.SmsProperties;
|
||||
import com.ruoyi.sms.core.SmsTemplate;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -34,7 +33,6 @@ public class SmsController {
|
||||
// private final SmsTemplate smsTemplate; // 可以使用spring注入
|
||||
// private final AliyunSmsTemplate smsTemplate; // 也可以注入某个厂家的模板工具
|
||||
|
||||
@Operation(summary = "发送短信Aliyun")
|
||||
@GetMapping("/sendAliyun")
|
||||
public R<Object> sendAliyun(@Parameter(name = "电话号") String phones,
|
||||
@Parameter(name = "模板ID") String templateId) {
|
||||
@ -51,7 +49,6 @@ public class SmsController {
|
||||
return R.ok(send);
|
||||
}
|
||||
|
||||
@Operation(summary = "发送短信Tencent")
|
||||
@GetMapping("/sendTencent")
|
||||
public R<Object> sendTencent(@Parameter(name = "电话号") String phones,
|
||||
@Parameter(name = "模板ID") String templateId) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.demo.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
@ -26,7 +25,6 @@ public class Swagger3DemoController {
|
||||
* 上传请求
|
||||
* 必须使用 @RequestPart 注解标注为文件
|
||||
*/
|
||||
@Operation(summary = "通用上传请求")
|
||||
@Parameters({
|
||||
@Parameter(name = "file", description = "文件", in = ParameterIn.QUERY, required = true)
|
||||
})
|
||||
|
@ -5,7 +5,6 @@ import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.demo.domain.TestDemo;
|
||||
import com.ruoyi.demo.mapper.TestDemoMapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@ -38,7 +37,6 @@ public class TestBatchController extends BaseController {
|
||||
* <p>
|
||||
* 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度
|
||||
*/
|
||||
@Operation(summary = "新增批量方法")
|
||||
@PostMapping("/add")
|
||||
// @DS("slave")
|
||||
public R<Void> add() {
|
||||
@ -58,7 +56,6 @@ public class TestBatchController extends BaseController {
|
||||
* <p>
|
||||
* 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度
|
||||
*/
|
||||
@Operation(summary = "新增或更新批量方法")
|
||||
@PostMapping("/addOrUpdate")
|
||||
// @DS("slave")
|
||||
public R<Void> addOrUpdate() {
|
||||
@ -84,7 +81,6 @@ public class TestBatchController extends BaseController {
|
||||
/**
|
||||
* 删除批量方法
|
||||
*/
|
||||
@Operation(summary = "删除批量方法")
|
||||
@DeleteMapping()
|
||||
// @DS("slave")
|
||||
public R<Void> remove() {
|
||||
|
@ -20,7 +20,6 @@ import com.ruoyi.demo.domain.bo.TestDemoBo;
|
||||
import com.ruoyi.demo.domain.bo.TestDemoImportVo;
|
||||
import com.ruoyi.demo.domain.vo.TestDemoVo;
|
||||
import com.ruoyi.demo.service.ITestDemoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
@ -55,7 +54,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 查询测试单表列表
|
||||
*/
|
||||
@Operation(summary = "查询测试单表列表")
|
||||
@SaCheckPermission("demo:demo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TestDemoVo> list(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
|
||||
@ -65,14 +63,12 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 自定义分页查询
|
||||
*/
|
||||
@Operation(summary = "自定义分页查询")
|
||||
@SaCheckPermission("demo:demo:list")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo<TestDemoVo> page(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
|
||||
return iTestDemoService.customPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
@Operation(summary = "导入测试-校验")
|
||||
@Parameters({
|
||||
@Parameter(name = "file", description = "导入文件", in = ParameterIn.QUERY, required = true),
|
||||
})
|
||||
@ -90,7 +86,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 导出测试单表列表
|
||||
*/
|
||||
@Operation(summary = "导出测试单表列表")
|
||||
@SaCheckPermission("demo:demo:export")
|
||||
@Log(title = "测试单表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ -106,7 +101,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 获取测试单表详细信息
|
||||
*/
|
||||
@Operation(summary = "获取测试单表详细信息")
|
||||
@SaCheckPermission("demo:demo:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TestDemoVo> getInfo(@Parameter(name = "测试ID")
|
||||
@ -118,7 +112,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 新增测试单表
|
||||
*/
|
||||
@Operation(summary = "新增测试单表")
|
||||
@SaCheckPermission("demo:demo:add")
|
||||
@Log(title = "测试单表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit(interval = 2, timeUnit = TimeUnit.SECONDS, message = "{repeat.submit.message}")
|
||||
@ -133,7 +126,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 修改测试单表
|
||||
*/
|
||||
@Operation(summary = "修改测试单表")
|
||||
@SaCheckPermission("demo:demo:edit")
|
||||
@Log(title = "测试单表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@ -145,7 +137,6 @@ public class TestDemoController extends BaseController {
|
||||
/**
|
||||
* 删除测试单表
|
||||
*/
|
||||
@Operation(summary = "删除测试单表")
|
||||
@SaCheckPermission("demo:demo:remove")
|
||||
@Log(title = "测试单表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
@ -29,7 +28,6 @@ public class TestExcelController {
|
||||
/**
|
||||
* 单列表多数据
|
||||
*/
|
||||
@Operation(summary = "单列表多数据")
|
||||
@GetMapping("/exportTemplateOne")
|
||||
public void exportTemplateOne(HttpServletResponse response) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
@ -49,7 +47,6 @@ public class TestExcelController {
|
||||
/**
|
||||
* 多列表多数据
|
||||
*/
|
||||
@Operation(summary = "多列表多数据")
|
||||
@GetMapping("/exportTemplateMuliti")
|
||||
public void exportTemplateMuliti(HttpServletResponse response) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.MessageUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
@ -33,7 +32,6 @@ public class TestI18nController {
|
||||
* <p>
|
||||
* 测试使用 user.register.success
|
||||
*/
|
||||
@Operation(summary = "通过code获取国际化内容")
|
||||
@GetMapping()
|
||||
public R<Void> get(@Parameter(name = "国际化code") String code) {
|
||||
return R.ok(MessageUtils.message(code));
|
||||
@ -45,7 +43,6 @@ public class TestI18nController {
|
||||
* <p>
|
||||
* 测试使用 not.null
|
||||
*/
|
||||
@Operation(summary = "Validator 校验国际化")
|
||||
@GetMapping("/test1")
|
||||
public R<Void> test1(@NotBlank(message = "{not.null}") String str) {
|
||||
return R.ok(str);
|
||||
@ -57,7 +54,6 @@ public class TestI18nController {
|
||||
* <p>
|
||||
* 测试使用 not.null
|
||||
*/
|
||||
@Operation(summary = "Bean 校验国际化")
|
||||
@GetMapping("/test2")
|
||||
public R<TestI18nBo> test2(@Validated TestI18nBo bo) {
|
||||
return R.ok(bo);
|
||||
|
@ -4,7 +4,6 @@ import com.ruoyi.common.annotation.Sensitive;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.SensitiveStrategy;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -29,7 +28,6 @@ public class TestSensitiveController extends BaseController {
|
||||
/**
|
||||
* 测试数据脱敏
|
||||
*/
|
||||
@Operation(summary = "查询测试单表列表")
|
||||
@GetMapping("/test")
|
||||
public R<TestSensitive> test() {
|
||||
TestSensitive testSensitive = new TestSensitive();
|
||||
|
@ -13,7 +13,6 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.demo.domain.bo.TestTreeBo;
|
||||
import com.ruoyi.demo.domain.vo.TestTreeVo;
|
||||
import com.ruoyi.demo.service.ITestTreeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -44,7 +43,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 查询测试树表列表
|
||||
*/
|
||||
@Operation(summary = "查询测试树表列表")
|
||||
@SaCheckPermission("demo:tree:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) {
|
||||
@ -55,7 +53,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 导出测试树表列表
|
||||
*/
|
||||
@Operation(summary = "导出测试树表列表")
|
||||
@SaCheckPermission("demo:tree:export")
|
||||
@Log(title = "测试树表", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
@ -67,7 +64,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 获取测试树表详细信息
|
||||
*/
|
||||
@Operation(summary = "获取测试树表详细信息")
|
||||
@SaCheckPermission("demo:tree:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TestTreeVo> getInfo(@Parameter(name = "测试树ID")
|
||||
@ -79,7 +75,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 新增测试树表
|
||||
*/
|
||||
@Operation(summary = "新增测试树表")
|
||||
@SaCheckPermission("demo:tree:add")
|
||||
@Log(title = "测试树表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit
|
||||
@ -91,7 +86,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 修改测试树表
|
||||
*/
|
||||
@Operation(summary = "修改测试树表")
|
||||
@SaCheckPermission("demo:tree:edit")
|
||||
@Log(title = "测试树表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit
|
||||
@ -103,7 +97,6 @@ public class TestTreeController extends BaseController {
|
||||
/**
|
||||
* 删除测试树表
|
||||
*/
|
||||
@Operation(summary = "删除测试树表")
|
||||
@SaCheckPermission("demo:tree:remove")
|
||||
@Log(title = "测试树表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller.queue;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.redis.QueueUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -30,7 +29,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class BoundedQueueController {
|
||||
|
||||
|
||||
@Operation(summary = "添加队列数据")
|
||||
@GetMapping("/add")
|
||||
public R<Void> add(@Parameter(name = "队列名") String queueName,
|
||||
@Parameter(name = "容量") int capacity) {
|
||||
@ -56,7 +54,6 @@ public class BoundedQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除队列数据")
|
||||
@GetMapping("/remove")
|
||||
public R<Void> remove(@Parameter(name = "队列名") String queueName) {
|
||||
String data = "data-" + 5;
|
||||
@ -68,7 +65,6 @@ public class BoundedQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "获取队列数据")
|
||||
@GetMapping("/get")
|
||||
public R<Void> get(@Parameter(name = "队列名") String queueName) {
|
||||
String data;
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller.queue;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.redis.QueueUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -32,7 +31,6 @@ import java.util.concurrent.TimeUnit;
|
||||
@RequestMapping("/demo/queue/delayed")
|
||||
public class DelayedQueueController {
|
||||
|
||||
@Operation(summary = "订阅队列")
|
||||
@GetMapping("/subscribe")
|
||||
public R<Void> subscribe(@Parameter(name = "队列名") String queueName) {
|
||||
log.info("通道: {} 监听中......", queueName);
|
||||
@ -44,7 +42,6 @@ public class DelayedQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "添加队列数据")
|
||||
@GetMapping("/add")
|
||||
public R<Void> add(@Parameter(name = "队列名") String queueName,
|
||||
@Parameter(name = "订单号") String orderNum,
|
||||
@ -55,7 +52,6 @@ public class DelayedQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除队列数据")
|
||||
@GetMapping("/remove")
|
||||
public R<Void> remove(@Parameter(name = "队列名") String queueName,
|
||||
@Parameter(name = "订单号") String orderNum) {
|
||||
@ -67,7 +63,6 @@ public class DelayedQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "销毁队列")
|
||||
@GetMapping("/destroy")
|
||||
public R<Void> destroy(@Parameter(name = "队列名") String queueName) {
|
||||
// 用完了一定要销毁 否则会一直存在
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.demo.controller.queue;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.redis.QueueUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -30,7 +29,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/demo/queue/priority")
|
||||
public class PriorityQueueController {
|
||||
|
||||
@Operation(summary = "添加队列数据")
|
||||
@GetMapping("/add")
|
||||
public R<Void> add(@Parameter(name = "队列名") String queueName) {
|
||||
// 用完了一定要销毁 否则会一直存在
|
||||
@ -58,7 +56,6 @@ public class PriorityQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "删除队列数据")
|
||||
@GetMapping("/remove")
|
||||
public R<Void> remove(@Parameter(name = "队列名") String queueName,
|
||||
@Parameter(name = "对象名") String name,
|
||||
@ -74,7 +71,6 @@ public class PriorityQueueController {
|
||||
return R.ok("操作成功");
|
||||
}
|
||||
|
||||
@Operation(summary = "获取队列数据")
|
||||
@GetMapping("/get")
|
||||
public R<Void> get(@Parameter(name = "队列名") String queueName) {
|
||||
PriorityDemo data;
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.demo.domain.bo;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -19,48 +18,41 @@ import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(name = "测试单表业务对象")
|
||||
public class TestDemoBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(name = "主键")
|
||||
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(name = "部门id")
|
||||
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(name = "用户id")
|
||||
@NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(name = "排序号")
|
||||
@NotNull(message = "排序号不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* key键
|
||||
*/
|
||||
@Schema(name = "key键")
|
||||
@NotBlank(message = "key键不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String testKey;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@Schema(name = "值")
|
||||
@NotBlank(message = "值不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String value;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.ruoyi.demo.domain.bo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@ -14,13 +13,11 @@ import javax.validation.constraints.NotNull;
|
||||
* @date 2021-07-26
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "测试单表业务对象")
|
||||
public class TestDemoImportVo {
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(name = "部门id")
|
||||
@NotNull(message = "部门id不能为空")
|
||||
@ExcelProperty(value = "部门id")
|
||||
private Long deptId;
|
||||
@ -28,7 +25,6 @@ public class TestDemoImportVo {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(name = "用户id")
|
||||
@NotNull(message = "用户id不能为空")
|
||||
@ExcelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
@ -36,7 +32,6 @@ public class TestDemoImportVo {
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@Schema(name = "排序号")
|
||||
@NotNull(message = "排序号不能为空")
|
||||
@ExcelProperty(value = "排序号")
|
||||
private Long orderNum;
|
||||
@ -44,7 +39,6 @@ public class TestDemoImportVo {
|
||||
/**
|
||||
* key键
|
||||
*/
|
||||
@Schema(name = "key键")
|
||||
@NotBlank(message = "key键不能为空")
|
||||
@ExcelProperty(value = "key键")
|
||||
private String testKey;
|
||||
@ -52,7 +46,6 @@ public class TestDemoImportVo {
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@Schema(name = "值")
|
||||
@NotBlank(message = "值不能为空")
|
||||
@ExcelProperty(value = "值")
|
||||
private String value;
|
||||
|
@ -3,7 +3,6 @@ package com.ruoyi.demo.domain.bo;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -19,34 +18,29 @@ import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(name = "测试树表业务对象")
|
||||
public class TestTreeBo extends TreeEntity<TestTreeBo> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(name = "主键")
|
||||
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@Schema(name = "部门id")
|
||||
@NotNull(message = "部门id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(name = "用户id")
|
||||
@NotNull(message = "用户id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 树节点名
|
||||
*/
|
||||
@Schema(name = "树节点名")
|
||||
@NotBlank(message = "树节点名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private String treeName;
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@ -15,7 +14,6 @@ import java.util.Date;
|
||||
* @date 2021-07-26
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "测试单表视图对象")
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TestDemoVo {
|
||||
|
||||
@ -25,70 +23,60 @@ public class TestDemoVo {
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
@Schema(name = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ExcelProperty(value = "部门id")
|
||||
@Schema(name = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ExcelProperty(value = "用户id")
|
||||
@Schema(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@ExcelProperty(value = "排序号")
|
||||
@Schema(name = "排序号")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* key键
|
||||
*/
|
||||
@ExcelProperty(value = "key键")
|
||||
@Schema(name = "key键")
|
||||
private String testKey;
|
||||
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
@ExcelProperty(value = "值")
|
||||
@Schema(name = "值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ExcelProperty(value = "创建人")
|
||||
@Schema(name = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ExcelProperty(value = "更新时间")
|
||||
@Schema(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ExcelProperty(value = "更新人")
|
||||
@Schema(name = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@ -15,7 +14,6 @@ import java.util.Date;
|
||||
* @date 2021-07-26
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "测试树表视图对象")
|
||||
@ExcelIgnoreUnannotated
|
||||
public class TestTreeVo {
|
||||
|
||||
@ -24,42 +22,36 @@ public class TestTreeVo {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(name = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
@ExcelProperty(value = "父id")
|
||||
@Schema(name = "父id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ExcelProperty(value = "部门id")
|
||||
@Schema(name = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ExcelProperty(value = "用户id")
|
||||
@Schema(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 树节点名
|
||||
*/
|
||||
@ExcelProperty(value = "树节点名")
|
||||
@Schema(name = "树节点名")
|
||||
private String treeName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
@Schema(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user