From 4e10a0c2ef0ea1207671dac2144fb1ef96edcbe8 Mon Sep 17 00:00:00 2001 From: byeJuly <3165119086@qq.com> Date: Wed, 10 Apr 2024 17:51:16 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Infra=20=E6=A8=A1?= =?UTF-8?q?=E5=9D=97:=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E8=BE=BE=E6=A2=A68=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=90=8E,=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=EF=BC=9A=20=E8=B0=83=E6=95=B4=E7=AD=96?= =?UTF-8?q?=E7=95=A5=EF=BC=9A=E5=88=A0=E9=99=A4->=20autoIncrement=20<-?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/dm/ruoyi-vue-pro-dm8.sql | 3 --- sql/mysql/ruoyi-vue-pro.sql | 2 +- sql/oracle/ruoyi-vue-pro.sql | 2 -- sql/postgresql/ruoyi-vue-pro.sql | 3 --- sql/sqlserver/ruoyi-vue-pro.sql | 8 -------- .../admin/codegen/vo/column/CodegenColumnRespVO.java | 3 --- .../admin/codegen/vo/column/CodegenColumnSaveReqVO.java | 4 ---- .../module/infra/convert/codegen/CodegenConvert.java | 1 - .../infra/dal/dataobject/codegen/CodegenColumnDO.java | 6 ------ .../infra/service/codegen/inner/CodegenBuilderTest.java | 1 - .../src/test/resources/codegen/table/category.json | 3 +-- .../src/test/resources/codegen/table/contact.json | 3 +-- .../src/test/resources/codegen/table/student.json | 3 +-- .../src/test/resources/codegen/table/teacher.json | 3 +-- 14 files changed, 5 insertions(+), 40 deletions(-) diff --git a/sql/dm/ruoyi-vue-pro-dm8.sql b/sql/dm/ruoyi-vue-pro-dm8.sql index e5369739e..98c29b431 100644 --- a/sql/dm/ruoyi-vue-pro-dm8.sql +++ b/sql/dm/ruoyi-vue-pro-dm8.sql @@ -249,7 +249,6 @@ CREATE TABLE "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN" "COLUMN_COMMENT" VARCHAR(500) NOT NULL, "NULLABLE" BIT NOT NULL, "PRIMARY_KEY" BIT NOT NULL, - "AUTO_INCREMENT" CHAR(1) NOT NULL, "ORDINAL_POSITION" INT NOT NULL, "JAVA_TYPE" VARCHAR(32) NOT NULL, "JAVA_FIELD" VARCHAR(64) NOT NULL, @@ -2512,8 +2511,6 @@ COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."NULLABLE" IS '是否 COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."PRIMARY_KEY" IS '是否主键'; -COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."AUTO_INCREMENT" IS '是否自增'; - COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."ORDINAL_POSITION" IS '排序'; COMMENT ON COLUMN "RUOYI_VUE_PRO"."INFRA_CODEGEN_COLUMN"."JAVA_TYPE" IS 'Java 属性类型'; diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 24385dab4..8e1bc421d 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -409,7 +409,7 @@ CREATE TABLE `infra_codegen_column` ( `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字段描述', `nullable` bit(1) NOT NULL COMMENT '是否允许为空', `primary_key` bit(1) NOT NULL COMMENT '是否主键', - `auto_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '是否自增', + `is_auto_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '是否自增', `ordinal_position` int NOT NULL COMMENT '排序', `java_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Java 属性类型', `java_field` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Java 属性名', diff --git a/sql/oracle/ruoyi-vue-pro.sql b/sql/oracle/ruoyi-vue-pro.sql index 0eb0f6440..dbe0e6a7b 100644 --- a/sql/oracle/ruoyi-vue-pro.sql +++ b/sql/oracle/ruoyi-vue-pro.sql @@ -622,7 +622,6 @@ CREATE TABLE "INFRA_CODEGEN_COLUMN" ( "COLUMN_COMMENT" NVARCHAR2(500), "NULLABLE" NUMBER(4,0), "PRIMARY_KEY" NUMBER(4,0), - "AUTO_INCREMENT" NUMBER(4,0), "ORDINAL_POSITION" NUMBER(11,0) NOT NULL, "JAVA_TYPE" NVARCHAR2(32), "JAVA_FIELD" NVARCHAR2(64), @@ -664,7 +663,6 @@ COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."DATA_TYPE" IS '字段类型'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."COLUMN_COMMENT" IS '字段描述'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."NULLABLE" IS '是否允许为空'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."PRIMARY_KEY" IS '是否主键'; -COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."AUTO_INCREMENT" IS '是否自增'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."ORDINAL_POSITION" IS '排序'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."JAVA_TYPE" IS 'Java 属性类型'; COMMENT ON COLUMN "INFRA_CODEGEN_COLUMN"."JAVA_FIELD" IS 'Java 属性名'; diff --git a/sql/postgresql/ruoyi-vue-pro.sql b/sql/postgresql/ruoyi-vue-pro.sql index 206fdfce8..cff06d5a7 100644 --- a/sql/postgresql/ruoyi-vue-pro.sql +++ b/sql/postgresql/ruoyi-vue-pro.sql @@ -1225,7 +1225,6 @@ CREATE TABLE "infra_codegen_column" "column_comment" varchar(500) COLLATE "pg_catalog"."default" NOT NULL, "nullable" bool NOT NULL, "primary_key" bool NOT NULL, - "auto_increment" bool NOT NULL, "ordinal_position" int4 NOT NULL, "java_type" varchar(32) COLLATE "pg_catalog"."default" NOT NULL, "java_field" varchar(64) COLLATE "pg_catalog"."default" NOT NULL, @@ -1259,8 +1258,6 @@ ON COLUMN "infra_codegen_column"."nullable" IS '是否允许为空'; COMMENT ON COLUMN "infra_codegen_column"."primary_key" IS '是否主键'; COMMENT -ON COLUMN "infra_codegen_column"."auto_increment" IS '是否自增'; -COMMENT ON COLUMN "infra_codegen_column"."ordinal_position" IS '排序'; COMMENT ON COLUMN "infra_codegen_column"."java_type" IS 'Java 属性类型'; diff --git a/sql/sqlserver/ruoyi-vue-pro.sql b/sql/sqlserver/ruoyi-vue-pro.sql index bfb10f6bd..830a96ab3 100644 --- a/sql/sqlserver/ruoyi-vue-pro.sql +++ b/sql/sqlserver/ruoyi-vue-pro.sql @@ -1957,7 +1957,6 @@ CREATE TABLE [dbo].[infra_codegen_column] ( [column_comment] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [nullable] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [primary_key] varchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, - [auto_increment] nchar(1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [ordinal_position] int NOT NULL, [java_type] nvarchar(32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [java_field] nvarchar(64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, @@ -2029,13 +2028,6 @@ EXEC sp_addextendedproperty 'COLUMN', N'primary_key' GO -EXEC sp_addextendedproperty -'MS_Description', N'是否自增', -'SCHEMA', N'dbo', -'TABLE', N'infra_codegen_column', -'COLUMN', N'auto_increment' -GO - EXEC sp_addextendedproperty 'MS_Description', N'排序', 'SCHEMA', N'dbo', diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java index f5384ab51..29a8c743e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnRespVO.java @@ -30,9 +30,6 @@ public class CodegenColumnRespVO { @Schema(description = "是否主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "false") private Boolean primaryKey; - @Schema(description = "是否自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - private Boolean autoIncrement; - @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer ordinalPosition; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnSaveReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnSaveReqVO.java index edad804ba..18067c2fa 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnSaveReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/codegen/vo/column/CodegenColumnSaveReqVO.java @@ -36,10 +36,6 @@ public class CodegenColumnSaveReqVO { @NotNull(message = "是否主键不能为空") private Boolean primaryKey; - @Schema(description = "是否自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - @NotNull(message = "是否自增不能为空") - private Boolean autoIncrement; - @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") @NotNull(message = "排序不能为空") private Integer ordinalPosition; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/convert/codegen/CodegenConvert.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/convert/codegen/CodegenConvert.java index feb4b2384..6b976135c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/convert/codegen/CodegenConvert.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/convert/codegen/CodegenConvert.java @@ -41,7 +41,6 @@ public interface CodegenConvert { @Mapping(source = "comment", target = "columnComment"), @Mapping(source = "metaInfo.nullable", target = "nullable"), @Mapping(source = "keyFlag", target = "primaryKey"), - @Mapping(source = "keyIdentityFlag", target = "autoIncrement"), @Mapping(source = "columnType.type", target = "javaType"), @Mapping(source = "propertyName", target = "javaField"), }) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/codegen/CodegenColumnDO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/codegen/CodegenColumnDO.java index 368162214..f90a3645a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/codegen/CodegenColumnDO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/dataobject/codegen/CodegenColumnDO.java @@ -67,12 +67,6 @@ public class CodegenColumnDO extends BaseDO { * 关联 {@link TableField#isKeyFlag()} */ private Boolean primaryKey; - /** - * 是否自增 - * - * 关联 {@link TableField#isKeyIdentityFlag()} - */ - private Boolean autoIncrement; /** * 排序 */ diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java index 01a55be19..ce283ec51 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java @@ -72,7 +72,6 @@ public class CodegenBuilderTest extends BaseMockitoUnitTest { assertEquals("编号", column.getColumnComment()); assertFalse(column.getNullable()); assertTrue(column.getPrimaryKey()); - assertTrue(column.getAutoIncrement()); assertEquals(1, column.getOrdinalPosition()); assertEquals("Long", column.getJavaType()); assertEquals("id", column.getJavaField()); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json index 210613f5d..ea58fc3f3 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json @@ -18,7 +18,6 @@ "dataType" : "BIGINT", "columnComment" : "编号", "primaryKey" : true, - "autoIncrement" : true, "javaType" : "Long", "javaField" : "id", "example" : "1024", @@ -50,4 +49,4 @@ "updateOperation" : true, "listOperationResult" : true } ] -} \ No newline at end of file +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json index 6a310570f..1ce00a90e 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json @@ -14,7 +14,6 @@ "dataType" : "BIGINT", "columnComment" : "编号", "primaryKey" : true, - "autoIncrement" : true, "javaType" : "Long", "javaField" : "id", "example" : "1024", @@ -141,4 +140,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} \ No newline at end of file +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json index 0cc29c5a9..29cb071eb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json @@ -17,7 +17,6 @@ "dataType" : "BIGINT", "columnComment" : "编号", "primaryKey" : true, - "autoIncrement" : true, "javaType" : "Long", "javaField" : "id", "example" : "1024", @@ -132,4 +131,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} \ No newline at end of file +} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json index 7ef460400..2fcb475a1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json @@ -14,7 +14,6 @@ "dataType" : "BIGINT", "columnComment" : "编号", "primaryKey" : true, - "autoIncrement" : true, "javaType" : "Long", "javaField" : "id", "example" : "1024", @@ -141,4 +140,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} \ No newline at end of file +} From f89d9f6d9915da3d3b7d9b8c3159255cdf0d9802 Mon Sep 17 00:00:00 2001 From: byeJuly <3165119086@qq.com> Date: Wed, 10 Apr 2024 19:08:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=BC=8F=E6=8E=89=E4=B8=80=E4=B8=AAmysql,?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/ruoyi-vue-pro.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index 8e1bc421d..5950b3fff 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -409,7 +409,6 @@ CREATE TABLE `infra_codegen_column` ( `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '字段描述', `nullable` bit(1) NOT NULL COMMENT '是否允许为空', `primary_key` bit(1) NOT NULL COMMENT '是否主键', - `is_auto_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '是否自增', `ordinal_position` int NOT NULL COMMENT '排序', `java_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Java 属性类型', `java_field` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Java 属性名', From ddafd441140417dc23a5b7e190b5cc9185fd3bdd Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Apr 2024 09:35:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90=E5=AE=8C=E5=96=84=E3=80=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=AF=B9=20DM=20=E8=BE=BE?= =?UTF-8?q?=E6=A2=A6=E6=95=B0=E6=8D=AE=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7?= =?UTF-8?q?=20=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E6=96=B0=E5=A2=9E=20ssl?= =?UTF-8?q?Enable=20=E5=AD=97=E6=AE=B5=EF=BC=8C=E6=94=AF=E6=8C=81=20outloo?= =?UTF-8?q?k=20=E9=82=AE=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/service/codegen/inner/CodegenBuilderTest.java | 1 - .../src/test/resources/codegen/table/category.json | 2 +- .../src/test/resources/codegen/table/contact.json | 2 +- .../src/test/resources/codegen/table/student.json | 2 +- .../src/test/resources/codegen/table/teacher.json | 2 +- .../src/test/resources/sql/create_tables.sql | 1 - .../admin/mail/vo/account/MailAccountRespVO.java | 3 +++ .../admin/mail/vo/account/MailAccountSaveReqVO.java | 7 +++++-- .../module/system/dal/dataobject/mail/MailAccountDO.java | 4 ++++ .../module/system/service/mail/MailSendServiceImpl.java | 3 ++- .../src/test/resources/sql/create_tables.sql | 1 + 11 files changed, 19 insertions(+), 9 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java index ce283ec51..7a26ea9cc 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/codegen/inner/CodegenBuilderTest.java @@ -54,7 +54,6 @@ public class CodegenBuilderTest extends BaseMockitoUnitTest { when(metaInfo.getJdbcType()).thenReturn(JdbcType.BIGINT); when(tableField.getComment()).thenReturn("编号"); when(tableField.isKeyFlag()).thenReturn(true); - when(tableField.isKeyIdentityFlag()).thenReturn(true); IColumnType columnType = mock(IColumnType.class); when(tableField.getColumnType()).thenReturn(columnType); when(columnType.getType()).thenReturn("Long"); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json index ea58fc3f3..033c048a5 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/category.json @@ -49,4 +49,4 @@ "updateOperation" : true, "listOperationResult" : true } ] -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json index 1ce00a90e..74f92cd1d 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/contact.json @@ -140,4 +140,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json index 29cb071eb..efe8af4a2 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/student.json @@ -131,4 +131,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json index 2fcb475a1..4d93518eb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/codegen/table/teacher.json @@ -140,4 +140,4 @@ "listOperationResult" : true, "htmlType" : "datetime" } ] -} +} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql index d4ca2b80e..d4b19c926 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql @@ -196,7 +196,6 @@ CREATE TABLE IF NOT EXISTS "infra_codegen_column" ( "column_comment" varchar(500) NOT NULL, "nullable" tinyint not null, "primary_key" tinyint not null, - "auto_increment" varchar(5) not null, "ordinal_position" int not null, "java_type" varchar(32) NOT NULL, "java_field" varchar(64) NOT NULL, diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java index c1dc376df..15232b218 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountRespVO.java @@ -30,6 +30,9 @@ public class MailAccountRespVO { @Schema(description = "是否开启 ssl", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean sslEnable; + @Schema(description = "是否开启 starttls", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean starttlsEnable; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSaveReqVO.java index f7c84a561..d99d42f61 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountSaveReqVO.java @@ -1,10 +1,9 @@ package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotNull; +import lombok.Data; @Schema(description = "管理后台 - 邮箱账号创建/修改 Request VO") @Data @@ -38,4 +37,8 @@ public class MailAccountSaveReqVO { @NotNull(message = "是否开启 ssl 必填") private Boolean sslEnable; + @Schema(description = "是否开启 starttls", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + @NotNull(message = "是否开启 starttls 必填") + private Boolean starttlsEnable; + } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java index 275fc8570..0f9588616 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java @@ -49,5 +49,9 @@ public class MailAccountDO extends BaseDO { * 是否开启 SSL */ private Boolean sslEnable; + /** + * 是否开启 STARTTLS + */ + private Boolean starttlsEnable; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java index 178a64aec..306b05c04 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/mail/MailSendServiceImpl.java @@ -120,7 +120,8 @@ public class MailSendServiceImpl implements MailSendService { String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail(); return new MailAccount().setFrom(from).setAuth(true) .setUser(account.getUsername()).setPass(account.getPassword().toCharArray()) - .setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable()); + .setHost(account.getHost()).setPort(account.getPort()) + .setSslEnable(account.getSslEnable()).setStarttlsEnable(account.getStarttlsEnable()); } @VisibleForTesting diff --git a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql index 8f1ac5e0a..087540a6e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-system/yudao-module-system-biz/src/test/resources/sql/create_tables.sql @@ -520,6 +520,7 @@ CREATE TABLE IF NOT EXISTS "system_mail_account" ( "host" varchar NOT NULL, "port" int NOT NULL, "ssl_enable" bit NOT NULL, + "starttls_enable" bit NOT NULL, "creator" varchar DEFAULT '', "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, "updater" varchar DEFAULT '', From b150605da9c7d6c8bea1c1c68bea8c5c3d24686c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Apr 2024 09:38:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2-?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9C=AA=E6=8C=89=E7=85=A7=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=8E=92=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/system/dal/mysql/permission/RoleMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java index f6d86d1a1..d41f9dd5c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/permission/RoleMapper.java @@ -21,7 +21,7 @@ public interface RoleMapper extends BaseMapperX { .likeIfPresent(RoleDO::getCode, reqVO.getCode()) .eqIfPresent(RoleDO::getStatus, reqVO.getStatus()) .betweenIfPresent(BaseDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(RoleDO::getId)); + .orderByAsc(RoleDO::getId)); } default RoleDO selectByName(String name) {