Commit 114f1e4833daba016b2ba484b8eb7be633ef1b2c
1 parent
461c7894
对齐 boot 与 cloud 的代码
Showing
12 changed files
with
14 additions
and
32 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/WebFilterOrderEnum.java
| @@ -27,8 +27,6 @@ public interface WebFilterOrderEnum { | @@ -27,8 +27,6 @@ public interface WebFilterOrderEnum { | ||
| 27 | 27 | ||
| 28 | int TENANT_SECURITY_FILTER = -99; // 需要保证在 Spring Security 过滤器后面 | 28 | int TENANT_SECURITY_FILTER = -99; // 需要保证在 Spring Security 过滤器后面 |
| 29 | 29 | ||
| 30 | - int ACTIVITI_FILTER = -98; // 需要保证在 Spring Security 过滤后面 | ||
| 31 | - | ||
| 32 | int FLOWABLE_FILTER = -98; // 需要保证在 Spring Security 过滤后面 | 30 | int FLOWABLE_FILTER = -98; // 需要保证在 Spring Security 过滤后面 |
| 33 | 31 | ||
| 34 | int DEMO_FILTER = Integer.MAX_VALUE; | 32 | int DEMO_FILTER = Integer.MAX_VALUE; |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/exception/enums/GlobalErrorCodeConstants.java
| @@ -37,15 +37,4 @@ public interface GlobalErrorCodeConstants { | @@ -37,15 +37,4 @@ public interface GlobalErrorCodeConstants { | ||
| 37 | 37 | ||
| 38 | ErrorCode UNKNOWN = new ErrorCode(999, "未知错误"); | 38 | ErrorCode UNKNOWN = new ErrorCode(999, "未知错误"); |
| 39 | 39 | ||
| 40 | - /** | ||
| 41 | - * 是否为服务端错误,参考 HTTP 5XX 错误码段 | ||
| 42 | - * | ||
| 43 | - * @param code 错误码 | ||
| 44 | - * @return 是否 | ||
| 45 | - */ | ||
| 46 | - static boolean isServerErrorCode(Integer code) { | ||
| 47 | - return code != null | ||
| 48 | - && code >= INTERNAL_SERVER_ERROR.getCode() && code <= INTERNAL_SERVER_ERROR.getCode() + 99; | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | } | 40 | } |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/CommonResult.java
| 1 | package cn.iocoder.yudao.framework.common.pojo; | 1 | package cn.iocoder.yudao.framework.common.pojo; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.exception.ErrorCode; | 3 | import cn.iocoder.yudao.framework.common.exception.ErrorCode; |
| 4 | -import cn.iocoder.yudao.framework.common.exception.ServerException; | ||
| 5 | import cn.iocoder.yudao.framework.common.exception.ServiceException; | 4 | import cn.iocoder.yudao.framework.common.exception.ServiceException; |
| 6 | import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; | 5 | import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; |
| 7 | import com.fasterxml.jackson.annotation.JsonIgnore; | 6 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| @@ -92,10 +91,6 @@ public class CommonResult<T> implements Serializable { | @@ -92,10 +91,6 @@ public class CommonResult<T> implements Serializable { | ||
| 92 | if (isSuccess()) { | 91 | if (isSuccess()) { |
| 93 | return; | 92 | return; |
| 94 | } | 93 | } |
| 95 | - // 服务端异常 | ||
| 96 | - if (GlobalErrorCodeConstants.isServerErrorCode(code)) { | ||
| 97 | - throw new ServerException(code, msg); | ||
| 98 | - } | ||
| 99 | // 业务异常 | 94 | // 业务异常 |
| 100 | throw new ServiceException(code, msg); | 95 | throw new ServiceException(code, msg); |
| 101 | } | 96 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/CodegenPreviewRespVO.java
| @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; | @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo; | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | import lombok.Data; | 4 | import lombok.Data; |
| 5 | 5 | ||
| 6 | -@Schema(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象") | 6 | +@Schema(description = "管理后台 - 代码生成预览 Response VO,注意,每个文件都是一个该对象") |
| 7 | @Data | 7 | @Data |
| 8 | public class CodegenPreviewRespVO { | 8 | public class CodegenPreviewRespVO { |
| 9 | 9 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/table/CodegenTableBaseVO.java
| @@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull; | @@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 12 | @Data |
| 13 | public class CodegenTableBaseVO { | 13 | public class CodegenTableBaseVO { |
| 14 | 14 | ||
| 15 | - @Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 15 | + @Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 16 | @NotNull(message = "导入类型不能为空") | 16 | @NotNull(message = "导入类型不能为空") |
| 17 | private Integer scene; | 17 | private Integer scene; |
| 18 | 18 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigCreateReqVO.java
| @@ -14,7 +14,7 @@ import java.util.Map; | @@ -14,7 +14,7 @@ import java.util.Map; | ||
| 14 | @ToString(callSuper = true) | 14 | @ToString(callSuper = true) |
| 15 | public class FileConfigCreateReqVO extends FileConfigBaseVO { | 15 | public class FileConfigCreateReqVO extends FileConfigBaseVO { |
| 16 | 16 | ||
| 17 | - @Schema(description = "存储器,参见 FileStorageEnum 枚举类参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 17 | + @Schema(description = "存储器,参见 FileStorageEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 18 | @NotNull(message = "存储器不能为空") | 18 | @NotNull(message = "存储器不能为空") |
| 19 | private Integer storage; | 19 | private Integer storage; |
| 20 | 20 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/config/FileConfigPageReqVO.java
| @@ -23,8 +23,8 @@ public class FileConfigPageReqVO extends PageParam { | @@ -23,8 +23,8 @@ public class FileConfigPageReqVO extends PageParam { | ||
| 23 | @Schema(description = "存储器", example = "1") | 23 | @Schema(description = "存储器", example = "1") |
| 24 | private Integer storage; | 24 | private Integer storage; |
| 25 | 25 | ||
| 26 | + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") | ||
| 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | - @Schema(description = "创建时间") | ||
| 28 | private LocalDateTime[] createTime; | 28 | private LocalDateTime[] createTime; |
| 29 | 29 | ||
| 30 | } | 30 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java
| @@ -20,11 +20,11 @@ public class FilePageReqVO extends PageParam { | @@ -20,11 +20,11 @@ public class FilePageReqVO extends PageParam { | ||
| 20 | @Schema(description = "文件路径,模糊匹配", example = "yudao") | 20 | @Schema(description = "文件路径,模糊匹配", example = "yudao") |
| 21 | private String path; | 21 | private String path; |
| 22 | 22 | ||
| 23 | - @Schema(description = "文件类型,模糊匹配", example = "application/octet-stream") | 23 | + @Schema(description = "文件类型,模糊匹配", example = "jpg") |
| 24 | private String type; | 24 | private String type; |
| 25 | 25 | ||
| 26 | + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") | ||
| 26 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 27 | - @Schema(description = "创建时间") | ||
| 28 | private LocalDateTime[] createTime; | 28 | private LocalDateTime[] createTime; |
| 29 | 29 | ||
| 30 | } | 30 | } |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/logger/vo/apiaccesslog/ApiAccessLogExportReqVO.java
| @@ -24,8 +24,8 @@ public class ApiAccessLogExportReqVO { | @@ -24,8 +24,8 @@ public class ApiAccessLogExportReqVO { | ||
| 24 | @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy") | 24 | @Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy") |
| 25 | private String requestUrl; | 25 | private String requestUrl; |
| 26 | 26 | ||
| 27 | + @Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") | ||
| 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 28 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 28 | - @Schema(description = "开始请求时间") | ||
| 29 | private LocalDateTime[] beginTime; | 29 | private LocalDateTime[] beginTime; |
| 30 | 30 | ||
| 31 | @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100") | 31 | @Schema(description = "执行时长,大于等于,单位:毫秒", example = "100") |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/db/DatabaseTableServiceImpl.java
| @@ -57,7 +57,7 @@ public class DatabaseTableServiceImpl implements DatabaseTableService { | @@ -57,7 +57,7 @@ public class DatabaseTableServiceImpl implements DatabaseTableService { | ||
| 57 | strategyConfig.addExclude("ACT_[\\S\\s]+|QRTZ_[\\S\\s]+|FLW_[\\S\\s]+"); | 57 | strategyConfig.addExclude("ACT_[\\S\\s]+|QRTZ_[\\S\\s]+|FLW_[\\S\\s]+"); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | - GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 Date 类型,不使用 LocalDate | 60 | + GlobalConfig globalConfig = new GlobalConfig.Builder().dateType(DateType.TIME_PACK).build(); // 只使用 LocalDateTime 类型,不使用 LocalDate |
| 61 | ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfig, strategyConfig.build(), | 61 | ConfigBuilder builder = new ConfigBuilder(null, dataSourceConfig, strategyConfig.build(), |
| 62 | null, globalConfig, null); | 62 | null, globalConfig, null); |
| 63 | // 按照名字排序 | 63 | // 按照名字排序 |
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/test/TestDemoServiceImpl.java
| @@ -79,7 +79,7 @@ public class TestDemoServiceImpl implements TestDemoService { | @@ -79,7 +79,7 @@ public class TestDemoServiceImpl implements TestDemoService { | ||
| 79 | 79 | ||
| 80 | @Override | 80 | @Override |
| 81 | public PageResult<TestDemoDO> getTestDemoPage(TestDemoPageReqVO pageReqVO) { | 81 | public PageResult<TestDemoDO> getTestDemoPage(TestDemoPageReqVO pageReqVO) { |
| 82 | - testDemoMapper.selectList2(); | 82 | +// testDemoMapper.selectList2(); |
| 83 | return testDemoMapper.selectPage(pageReqVO); | 83 | return testDemoMapper.selectPage(pageReqVO); |
| 84 | } | 84 | } |
| 85 | 85 |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserPageReqVO.java
| @@ -19,20 +19,20 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | @@ -19,20 +19,20 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | ||
| 19 | @EqualsAndHashCode(callSuper = true) | 19 | @EqualsAndHashCode(callSuper = true) |
| 20 | public class UserPageReqVO extends PageParam { | 20 | public class UserPageReqVO extends PageParam { |
| 21 | 21 | ||
| 22 | - @Schema(description = "用户账号,模糊匹配", example = "yudao") | 22 | + @Schema(description = "用户账号,模糊匹配", example = "yudao") |
| 23 | private String username; | 23 | private String username; |
| 24 | 24 | ||
| 25 | - @Schema(description = "手机号码,模糊匹配", example = "yudao") | 25 | + @Schema(description = "手机号码,模糊匹配", example = "yudao") |
| 26 | private String mobile; | 26 | private String mobile; |
| 27 | 27 | ||
| 28 | - @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") | 28 | + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") |
| 29 | private Integer status; | 29 | private Integer status; |
| 30 | 30 | ||
| 31 | - @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]") | 31 | + @Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]") |
| 32 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | 32 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 33 | private LocalDateTime[] createTime; | 33 | private LocalDateTime[] createTime; |
| 34 | 34 | ||
| 35 | - @Schema(description = "部门编号,同时筛选子部门", example = "1024") | 35 | + @Schema(description = "部门编号,同时筛选子部门", example = "1024") |
| 36 | private Long deptId; | 36 | private Long deptId; |
| 37 | 37 | ||
| 38 | } | 38 | } |