From 355168b43d62107de24e1d381444410e08a6502e Mon Sep 17 00:00:00 2001 From: yubaolee Date: Wed, 19 Feb 2025 16:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E6=AE=B5Comment=E6=8D=A2=E6=88=90Remark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/Base/SqlSugarBaseApp.cs | 3 +-- OpenAuth.App/BuilderTable/BuilderTableApp.cs | 16 ++++++++-------- .../BuilderTable/BuilderTableColumnApp.cs | 4 ++-- .../Request/AddOrUpdateBuilderTableColumnReq.cs | 2 +- .../Request/AddOrUpdateBuilderTableReq.cs | 2 +- OpenAuth.App/DbExtension.cs | 2 +- OpenAuth.App/Resources/ResourceApp.cs | 3 +-- .../SysPrinterPlanApp/SysPrinterPlanApp.cs | 3 +-- OpenAuth.App/Test/TestBuilder.cs | 2 +- OpenAuth.Repository/Domain/BuilderTable.cs | 4 ++-- OpenAuth.Repository/Domain/BuilderTableColumn.cs | 4 ++-- OpenAuth.WebApi/Startup.cs | 3 +-- 12 files changed, 22 insertions(+), 26 deletions(-) diff --git a/OpenAuth.App/Base/SqlSugarBaseApp.cs b/OpenAuth.App/Base/SqlSugarBaseApp.cs index f576c160..b8c047b3 100644 --- a/OpenAuth.App/Base/SqlSugarBaseApp.cs +++ b/OpenAuth.App/Base/SqlSugarBaseApp.cs @@ -35,8 +35,7 @@ namespace OpenAuth.App public T Get(string id) { - if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL - || SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle) + if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL) { return SugarClient.Queryable().Where("\"Id\"=@id", new {id = id}).First(); } diff --git a/OpenAuth.App/BuilderTable/BuilderTableApp.cs b/OpenAuth.App/BuilderTable/BuilderTableApp.cs index bc712324..b627cc69 100644 --- a/OpenAuth.App/BuilderTable/BuilderTableApp.cs +++ b/OpenAuth.App/BuilderTable/BuilderTableApp.cs @@ -148,7 +148,7 @@ namespace OpenAuth.App var builderColumn = new BuilderTableColumn { ColumnName = column.ColumnName, - Comment = column.Comment, + Remark = column.Comment, ColumnType = column.ColumnType, EntityType = column.EntityType, EntityName = column.ColumnName, @@ -178,7 +178,7 @@ namespace OpenAuth.App UnitWork.Update(u => u.Id == obj.Id, u => new BuilderTable { TableName = obj.TableName, - Comment = obj.Comment, + Remark = obj.Remark, ClassName = obj.ClassName, Namespace = obj.Namespace, ModuleCode = obj.ModuleCode, @@ -365,7 +365,7 @@ namespace OpenAuth.App { attributeBuilder.Append("/// "); attributeBuilder.Append("\r\n"); - attributeBuilder.Append(" ///" + column.Comment + ""); + attributeBuilder.Append(" ///" + column.Remark + ""); attributeBuilder.Append("\r\n"); attributeBuilder.Append(" /// "); attributeBuilder.Append("\r\n"); @@ -386,7 +386,7 @@ namespace OpenAuth.App var tableAttr = new StringBuilder(); tableAttr.Append("/// "); tableAttr.Append("\r\n"); - tableAttr.Append(" ///" + sysTableInfo.Comment + ""); + tableAttr.Append(" ///" + sysTableInfo.Remark + ""); tableAttr.Append("\r\n"); tableAttr.Append(" /// "); tableAttr.Append("\r\n"); @@ -463,12 +463,12 @@ namespace OpenAuth.App attributeBuilder.Append("/// "); attributeBuilder.Append("\r\n"); - attributeBuilder.Append(" ///" + column.Comment + ""); + attributeBuilder.Append(" ///" + column.Remark + ""); attributeBuilder.Append("\r\n"); attributeBuilder.Append(" /// "); attributeBuilder.Append("\r\n"); - attributeBuilder.Append(" [Description(\""+ column.Comment +"\")]"); + attributeBuilder.Append(" [Description(\""+ column.Remark +"\")]"); attributeBuilder.Append("\r\n"); string entityType = column.EntityType; @@ -523,7 +523,7 @@ namespace OpenAuth.App tableAttr.Append("/// "); tableAttr.Append("\r\n"); - tableAttr.Append(" ///" + tableInfo.Comment + ""); + tableAttr.Append(" ///" + tableInfo.Remark + ""); tableAttr.Append("\r\n"); tableAttr.Append(" /// "); tableAttr.Append("\r\n"); @@ -735,7 +735,7 @@ namespace OpenAuth.App foreach (BuilderTableColumn column in syscolums) { headerListBuilder.Append( - $" new ColumnDefine('{column.ColumnName.ToCamelCase()}', '{column.Comment}', {column.IsEdit.ToString().ToLower()}, {column.IsList.ToString().ToLower()}, '{column.EditType}', '{column.DataSource}', '{column.EntityType}', '{column.ColumnType}', '{column.EntityName}'),"); + $" new ColumnDefine('{column.ColumnName.ToCamelCase()}', '{column.Remark}', {column.IsEdit.ToString().ToLower()}, {column.IsList.ToString().ToLower()}, '{column.EditType}', '{column.DataSource}', '{column.EntityType}', '{column.ColumnType}', '{column.EntityName}'),"); headerListBuilder.Append("\r\n "); } diff --git a/OpenAuth.App/BuilderTable/BuilderTableColumnApp.cs b/OpenAuth.App/BuilderTable/BuilderTableColumnApp.cs index f7778466..e8dde248 100644 --- a/OpenAuth.App/BuilderTable/BuilderTableColumnApp.cs +++ b/OpenAuth.App/BuilderTable/BuilderTableColumnApp.cs @@ -57,7 +57,7 @@ namespace OpenAuth.App TableId = obj.TableId, TableName = obj.TableName, ColumnName = obj.ColumnName, - Comment = obj.Comment, + Remark = obj.Remark, ColumnType = obj.ColumnType, EntityType = obj.EntityType, EntityName = obj.EntityName, @@ -107,7 +107,7 @@ namespace OpenAuth.App var builderColumn = new BuilderTableColumn { ColumnName = column.ColumnName, - Comment = column.Comment, + Remark = column.Comment, ColumnType = column.ColumnType, EntityType = column.EntityType, EntityName = column.ColumnName, diff --git a/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableColumnReq.cs b/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableColumnReq.cs index 77144403..f513140a 100644 --- a/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableColumnReq.cs +++ b/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableColumnReq.cs @@ -42,7 +42,7 @@ namespace OpenAuth.App.Request /// /// 列描述 /// - public string Comment { get; set; } + public string Remark { get; set; } /// /// 列类型 /// diff --git a/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableReq.cs b/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableReq.cs index 36d22648..712e4bd4 100644 --- a/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableReq.cs +++ b/OpenAuth.App/BuilderTable/Request/AddOrUpdateBuilderTableReq.cs @@ -33,7 +33,7 @@ namespace OpenAuth.App.Request /// /// 表描述、中文名称 /// - public string Comment { get; set; } + public string Remark { get; set; } /// /// 父表ID diff --git a/OpenAuth.App/DbExtension.cs b/OpenAuth.App/DbExtension.cs index 14fb16ee..1b9a1e98 100644 --- a/OpenAuth.App/DbExtension.cs +++ b/OpenAuth.App/DbExtension.cs @@ -72,7 +72,7 @@ namespace OpenAuth.App { ColumnName = property.Name, TableName = moduleName, - Comment = description, + Remark = description, IsList = browsable, ColumnType = typeName }); diff --git a/OpenAuth.App/Resources/ResourceApp.cs b/OpenAuth.App/Resources/ResourceApp.cs index ccc6f4a8..2f15c555 100644 --- a/OpenAuth.App/Resources/ResourceApp.cs +++ b/OpenAuth.App/Resources/ResourceApp.cs @@ -85,8 +85,7 @@ namespace OpenAuth.App } var columnnames = columnFields.Select(u => u.ColumnName); - if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL - || SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle) + if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL) { columnnames = columnFields.Select(u => "\"" + u.ColumnName +"\""); } diff --git a/OpenAuth.App/SysPrinterPlanApp/SysPrinterPlanApp.cs b/OpenAuth.App/SysPrinterPlanApp/SysPrinterPlanApp.cs index 0f79e28c..30528d7b 100644 --- a/OpenAuth.App/SysPrinterPlanApp/SysPrinterPlanApp.cs +++ b/OpenAuth.App/SysPrinterPlanApp/SysPrinterPlanApp.cs @@ -41,8 +41,7 @@ namespace OpenAuth.App } var columnnames = columnFields.Select(u => u.ColumnName); - if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL - || SugarClient.CurrentConnectionConfig.DbType == DbType.Oracle) + if (SugarClient.CurrentConnectionConfig.DbType == DbType.PostgreSQL) { columnnames = columnFields.Select(u => "\"" + u.ColumnName +"\""); } diff --git a/OpenAuth.App/Test/TestBuilder.cs b/OpenAuth.App/Test/TestBuilder.cs index b4a7a2f4..36ecd4d1 100644 --- a/OpenAuth.App/Test/TestBuilder.cs +++ b/OpenAuth.App/Test/TestBuilder.cs @@ -57,7 +57,7 @@ namespace OpenAuth.App.Test app.Add(new AddOrUpdateBuilderTableReq() { TableName = "Stock", - Comment = "这是一个普通的应用管理生成模版", + Remark = "这是一个普通的应用管理生成模版", ClassName = "Stock", Namespace = "OpenAuth.Repository.Domain", ModuleCode = "StockApp", diff --git a/OpenAuth.Repository/Domain/BuilderTable.cs b/OpenAuth.Repository/Domain/BuilderTable.cs index 79461dc4..bae1a2c3 100644 --- a/OpenAuth.Repository/Domain/BuilderTable.cs +++ b/OpenAuth.Repository/Domain/BuilderTable.cs @@ -25,7 +25,7 @@ namespace OpenAuth.Repository.Domain public BuilderTable() { this.TableName= string.Empty; - this.Comment= string.Empty; + this.Remark= string.Empty; this.DetailTableName= string.Empty; this.DetailComment= string.Empty; this.ClassName= string.Empty; @@ -54,7 +54,7 @@ namespace OpenAuth.Repository.Domain /// 表描述、中文名称 /// [Description("表描述、中文名称")] - public string Comment { get; set; } + public string Remark { get; set; } /// /// 子表英文全称 /// diff --git a/OpenAuth.Repository/Domain/BuilderTableColumn.cs b/OpenAuth.Repository/Domain/BuilderTableColumn.cs index 7d09e7c3..7eb76d68 100644 --- a/OpenAuth.Repository/Domain/BuilderTableColumn.cs +++ b/OpenAuth.Repository/Domain/BuilderTableColumn.cs @@ -27,7 +27,7 @@ namespace OpenAuth.Repository.Domain this.TableId= string.Empty; this.TableName= string.Empty; this.ColumnName= string.Empty; - this.Comment= string.Empty; + this.Remark= string.Empty; this.ColumnType= string.Empty; this.EntityType= string.Empty; this.EntityName= string.Empty; @@ -64,7 +64,7 @@ namespace OpenAuth.Repository.Domain /// 列描述 /// [Description("列描述")] - public string Comment { get; set; } + public string Remark { get; set; } /// /// 列类型 /// diff --git a/OpenAuth.WebApi/Startup.cs b/OpenAuth.WebApi/Startup.cs index 1c8f6683..a357bffa 100644 --- a/OpenAuth.WebApi/Startup.cs +++ b/OpenAuth.WebApi/Startup.cs @@ -187,8 +187,7 @@ namespace OpenAuth.WebApi IsAutoCloseConnection = true, MoreSettings=new ConnMoreSettings() { PgSqlIsAutoToLower = false,//增删查改支持驼峰表 - PgSqlIsAutoToLowerCodeFirst = false, // 建表建驼峰表。5.1.3.30 - IsAutoToUpper=false //禁用自动转成大写表 + PgSqlIsAutoToLowerCodeFirst = false// 建表建驼峰表。5.1.3.30 } }, db => { db.Aop.OnLogExecuting = (sql, pars) => { logger.LogInformation(sql); }; }); return sqlSugar;