update 格式化全部代码
This commit is contained in:
+6
-6
@@ -39,9 +39,9 @@ public class MailSendController {
|
||||
/**
|
||||
* 发送邮件(带附件)
|
||||
*
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
*/
|
||||
@GetMapping("/sendMessageWithAttachment")
|
||||
public R<Void> sendMessageWithAttachment(String to, String subject, String text) {
|
||||
@@ -53,9 +53,9 @@ public class MailSendController {
|
||||
/**
|
||||
* 发送邮件(多附件)
|
||||
*
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
* @param to 接收人
|
||||
* @param subject 标题
|
||||
* @param text 内容
|
||||
*/
|
||||
@GetMapping("/sendMessageWithAttachments")
|
||||
public R<Void> sendMessageWithAttachments(String to, String subject, String text) {
|
||||
|
||||
+5
-5
@@ -50,7 +50,7 @@ public class MqttController {
|
||||
/**
|
||||
* 订阅 QoS0 测试主题并打印原始消息。
|
||||
*
|
||||
* @param topic 消息主题
|
||||
* @param topic 消息主题
|
||||
* @param payload 消息内容
|
||||
*/
|
||||
@MqttClientSubscribe("/test/#")
|
||||
@@ -61,7 +61,7 @@ public class MqttController {
|
||||
/**
|
||||
* 订阅 QoS1 测试主题并打印原始消息。
|
||||
*
|
||||
* @param topic 消息主题
|
||||
* @param topic 消息主题
|
||||
* @param payload 消息内容
|
||||
*/
|
||||
@MqttClientSubscribe(value = "/qos1/#", qos = MqttQoS.QOS1)
|
||||
@@ -72,7 +72,7 @@ public class MqttController {
|
||||
/**
|
||||
* 订阅带产品和设备占位符的注册主题。
|
||||
*
|
||||
* @param topic 消息主题
|
||||
* @param topic 消息主题
|
||||
* @param payload 消息内容
|
||||
*/
|
||||
@MqttClientSubscribe("/sys/${productKey}/${deviceName}/thing/sub/register")
|
||||
@@ -85,9 +85,9 @@ public class MqttController {
|
||||
/**
|
||||
* 订阅 JSON 测试主题并演示自定义反序列化。
|
||||
*
|
||||
* @param topic 消息主题
|
||||
* @param topic 消息主题
|
||||
* @param message MQTT 原始消息
|
||||
* @param data 反序列化后的演示数据
|
||||
* @param data 反序列化后的演示数据
|
||||
*/
|
||||
@MqttClientSubscribe(
|
||||
value = "/test/json",
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.redis.utils.RedisUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@ public class SmsController {
|
||||
* @param phone 手机号
|
||||
*/
|
||||
@GetMapping("/addBlacklist")
|
||||
public R<Object> addBlacklist(String phone){
|
||||
public R<Object> addBlacklist(String phone) {
|
||||
SmsBlend smsBlend = SmsFactory.getSmsBlend("config1");
|
||||
smsBlend.joinInBlacklist(phone);
|
||||
return R.ok();
|
||||
@@ -73,7 +73,7 @@ public class SmsController {
|
||||
* @param phone 手机号
|
||||
*/
|
||||
@GetMapping("/removeBlacklist")
|
||||
public R<Object> removeBlacklist(String phone){
|
||||
public R<Object> removeBlacklist(String phone) {
|
||||
SmsBlend smsBlend = SmsFactory.getSmsBlend("config1");
|
||||
smsBlend.removeFromBlacklist(phone);
|
||||
return R.ok();
|
||||
|
||||
+10
-10
@@ -1,36 +1,36 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.PageResult;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.ValidatorUtils;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.core.validate.QueryGroup;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.redis.annotation.RepeatSubmit;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.PageResult;
|
||||
import org.dromara.common.excel.core.ExcelResult;
|
||||
import org.dromara.common.excel.utils.ExcelBuilder;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.redis.annotation.RepeatSubmit;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.demo.domain.TestDemo;
|
||||
import org.dromara.demo.domain.bo.TestDemoBo;
|
||||
import org.dromara.demo.domain.vo.TestDemoImportVo;
|
||||
import org.dromara.demo.domain.vo.TestDemoVo;
|
||||
import org.dromara.demo.service.ITestDemoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
||||
+3
-4
@@ -1,17 +1,16 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.utils.MessageUtils;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
|
||||
/**
|
||||
* 测试国际化
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.sensitive.annotation.Sensitive;
|
||||
import org.dromara.common.sensitive.core.SensitiveStrategy;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.sensitive.annotation.Sensitive;
|
||||
import org.dromara.common.sensitive.core.SensitiveService;
|
||||
import org.dromara.common.sensitive.core.SensitiveStrategy;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
+6
-6
@@ -1,25 +1,25 @@
|
||||
package org.dromara.demo.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.core.validate.QueryGroup;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.excel.utils.ExcelBuilder;
|
||||
import org.dromara.common.redis.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.redis.annotation.RepeatSubmit;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.demo.domain.bo.TestTreeBo;
|
||||
import org.dromara.demo.domain.vo.TestTreeVo;
|
||||
import org.dromara.demo.service.ITestTreeService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class WebSocketController {
|
||||
/**
|
||||
* 发布消息
|
||||
*
|
||||
* @param userId 目标用户
|
||||
* @param userId 目标用户
|
||||
* @param message 发送内容
|
||||
*/
|
||||
@GetMapping("/send")
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package org.dromara.demo.controller.queue;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.redis.utils.QueueUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.redis.utils.QueueUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.dromara.demo.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import org.dromara.common.encrypt.annotation.EncryptField;
|
||||
import org.dromara.common.encrypt.enums.AlgorithmType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.encrypt.annotation.EncryptField;
|
||||
import org.dromara.common.encrypt.enums.AlgorithmType;
|
||||
|
||||
/**
|
||||
* 测试加密字段实体。
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.dromara.demo.domain.vo;
|
||||
|
||||
import org.apache.fesod.sheet.annotation.ExcelIgnoreUnannotated;
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.fesod.sheet.annotation.ExcelIgnoreUnannotated;
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import org.dromara.common.core.enums.UserStatus;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
|
||||
+2
-3
@@ -1,11 +1,10 @@
|
||||
package org.dromara.demo.domain.vo;
|
||||
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import org.dromara.demo.domain.TestDemo;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.dromara.demo.domain.vo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.apache.fesod.sheet.annotation.ExcelIgnoreUnannotated;
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import org.apache.fesod.sheet.annotation.format.DateTimeFormat;
|
||||
@@ -8,8 +10,6 @@ import org.dromara.common.excel.annotation.ExcelRequired;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.demo.domain.TestDemo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.dromara.demo.domain.vo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.apache.fesod.sheet.annotation.ExcelIgnoreUnannotated;
|
||||
import org.apache.fesod.sheet.annotation.ExcelProperty;
|
||||
import org.dromara.demo.domain.TestTree;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class ExportDemoListener extends DefaultExcelListener<ExportDemoVo> {
|
||||
/**
|
||||
* 解析并校验一行下拉框演示数据。
|
||||
*
|
||||
* @param data 行数据
|
||||
* @param data 行数据
|
||||
* @param context 解析上下文
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public interface TestDemoMapper extends BaseMapperPlus<TestDemo, TestDemoVo> {
|
||||
/**
|
||||
* 自定义分页查询演示数据。
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param page 分页对象
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public interface TestDemoMapper extends BaseMapperPlus<TestDemo, TestDemoVo> {
|
||||
/**
|
||||
* 分页查询演示 VO 列表并应用数据权限。
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param page 分页对象
|
||||
* @param wrapper 查询条件
|
||||
* @return 分页结果
|
||||
*/
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.dromara.demo.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.PageResult;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.demo.domain.TestDemo;
|
||||
import org.dromara.demo.domain.bo.TestDemoBo;
|
||||
import org.dromara.demo.domain.vo.TestDemoVo;
|
||||
@@ -28,7 +28,7 @@ public interface ITestDemoService {
|
||||
/**
|
||||
* 分页查询测试单表列表。
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface ITestDemoService {
|
||||
/**
|
||||
* 按自定义 SQL 分页查询测试单表列表。
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package org.dromara.demo.service.impl;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.apache.fesod.sheet.write.metadata.WriteSheet;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.fesod.sheet.write.metadata.WriteSheet;
|
||||
import org.dromara.common.core.constant.SystemConstants;
|
||||
import org.dromara.common.core.utils.StreamUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
@@ -115,7 +115,7 @@ public class ExportExcelServiceImpl implements IExportExcelService {
|
||||
* 构建下拉框显示值。
|
||||
*
|
||||
* @param cityDataList 城市演示数据列表
|
||||
* @param id 选项 id
|
||||
* @param id 选项 id
|
||||
* @return 下拉框显示值
|
||||
*/
|
||||
private String buildOptions(List<DemoCityData> cityDataList, Integer id) {
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
|
||||
/**
|
||||
* 分页查询测试单表列表。
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
|
||||
/**
|
||||
* 通过自定义 SQL 分页查询测试单表列表。
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 分页结果
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
|
||||
/**
|
||||
* 按主键集合删除测试单表数据,并按需执行删除前校验。
|
||||
*
|
||||
* @param ids 主键集合
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否执行删除校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
|
||||
+2
-2
@@ -39,13 +39,13 @@ public class TestTreeServiceImpl implements ITestTreeService {
|
||||
return treeMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
// @DS("slave") // 切换从库查询
|
||||
/**
|
||||
* 查询符合条件的测试树表列表。
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 结果列表
|
||||
*/
|
||||
// @DS("slave") // 切换从库查询
|
||||
@Override
|
||||
public List<TestTreeVo> queryList(TestTreeBo bo) {
|
||||
LambdaQueryWrapper<TestTree> lqw = buildQueryWrapper(bo);
|
||||
@@ -109,7 +109,7 @@ public class TestTreeServiceImpl implements ITestTreeService {
|
||||
/**
|
||||
* 按主键集合删除测试树表数据,并按需执行删除前校验。
|
||||
*
|
||||
* @param ids 主键集合
|
||||
* @param ids 主键集合
|
||||
* @param isValid 是否执行删除校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user