From 1a42fa51e1e8501487182437d45fe4bdd60fc98a Mon Sep 17 00:00:00 2001 From: haptear Date: Thu, 26 May 2022 08:58:36 +0800 Subject: [PATCH] =?UTF-8?q?0.0.12=20=E5=A4=84=E7=90=86order=E6=9C=89?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97=E6=97=B6=E5=87=BA=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSON.NET/APIJSON.NET/appsettings.json | 3 +-- APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj | 3 ++- APIJSON.NET/APIJSONCommon/SelectTable.cs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/APIJSON.NET/APIJSON.NET/appsettings.json b/APIJSON.NET/APIJSON.NET/appsettings.json index 3f3b41c..61e9556 100644 --- a/APIJSON.NET/APIJSON.NET/appsettings.json +++ b/APIJSON.NET/APIJSON.NET/appsettings.json @@ -1,8 +1,7 @@ { "ConnectionStrings": { "DbType": 0, //0:MySql,1:SqlServer,2:Sqlite - "ConnectionString": "Server=192.168.2.25;Database=yunwei1.8;Uid=root;Pwd=xmjk;Port=3306;Character Set=utf8;" - //"ConnectionString": "Server=119.29.9.25;Port=3306;Database=test;Uid=root;Pwd=1q,2w.3e?;CharSet=UTF8;" + "ConnectionString": "Server=localhost;Port=3306;Database=test;Uid=root;Pwd=test;CharSet=UTF8;" }, "CorsUrls": "http://localhost:5000,http://localhost5001", "Authentication": { diff --git a/APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj b/APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj index f6c0ce9..aa53c37 100644 --- a/APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj +++ b/APIJSON.NET/APIJSONCommon/ApiJson.Common.csproj @@ -2,8 +2,9 @@ netstandard2.1 - 0.0.11 + 0.0.12 + 0.0.12 处理order有关键字时出错的问题 0.0.11 升级sqlSugarCore版本 解决如果查找字段是关键字(例如:key)时出错的问题 0.0.10 处理别名如果为关键字的缺陷 0.0.8 清理SelectTable 支持重载 diff --git a/APIJSON.NET/APIJSONCommon/SelectTable.cs b/APIJSON.NET/APIJSONCommon/SelectTable.cs index c786308..b1b00e7 100644 --- a/APIJSON.NET/APIJSONCommon/SelectTable.cs +++ b/APIJSON.NET/APIJSONCommon/SelectTable.cs @@ -534,7 +534,7 @@ private void ProcessColumn(string subtable, string selectrole, JObject values, I { throw new Exception("别名不能超过20个字符"); } - str.Append(ziduan[0] + " as `" + ReplaceSQLChar(ziduan[1]) + "`,"); + str.Append("`"+ ziduan[0] + "`" + " as `" + ReplaceSQLChar(ziduan[1]) + "`,"); } else str.Append("`" + ziduan[0] + "`" + ","); @@ -645,15 +645,15 @@ private void ProcessOrder(string subtable, JObject values, ISugarQueryable