From 480e948fe661cf6376f101b50f959bc83fe0132a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 15 Mar 2024 20:16:25 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E4=BA=BA=E5=A4=A7=E9=87=91=E4=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Kdbndp/SqlBuilder/KdbndpExpressionContext.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs index ae55f7263..8425f3796 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Kdbndp/SqlBuilder/KdbndpExpressionContext.cs @@ -47,6 +47,14 @@ namespace SqlSugar else if (isMapping) { var mappingInfo = this.MappingTables.FirstOrDefault(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase)); + + var tableName = mappingInfo?.DbTableName + ""; + if (tableName.Contains(".")) + { + tableName = string.Join(UtilConstants.Dot, tableName.Split(UtilConstants.DotChar).Select(it => GetTranslationText(it))); + return tableName; + } + return SqlTranslationLeft + (mappingInfo == null ? entityName : mappingInfo.DbTableName).ToUpper(IsUpper) + SqlTranslationRight; } else if (isComplex)