From 974f384d4de5cf4e2a6ac4cb145587b4407be8af Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 24 Sep 2022 20:37:32 +0800 Subject: [PATCH] Optimize the MYSQL --- .../ExecuteNavProvider/InsertNavProviderManyToMany.cs | 4 ++++ .../Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs index dbe88cd2b..154ba3419 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/InsertNavProviderManyToMany.cs @@ -57,6 +57,10 @@ namespace SqlSugar { keyValuePairs.Add(pair.DbColumnName, DateTime.Now); } + else if (pair.UnderType == UtilConstants.StringType) + { + keyValuePairs.Add(pair.DbColumnName, UtilConstants.Space); + } else { keyValuePairs.Add(pair.DbColumnName, UtilMethods.GetDefaultValue(pair.UnderType)); diff --git a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs index a36956c5b..90776d96b 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/ExecuteNavProvider/UpdateNavManyToMany.cs @@ -67,6 +67,10 @@ namespace SqlSugar { keyValuePairs.Add(pair.DbColumnName, DateTime.Now); } + else if (pair.UnderType == UtilConstants.StringType) + { + keyValuePairs.Add(pair.DbColumnName, UtilConstants.Space); + } else { keyValuePairs.Add(pair.DbColumnName, UtilMethods.GetDefaultValue(pair.UnderType));