mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-09 10:55:02 +08:00
Code optimization
This commit is contained in:
@@ -359,13 +359,16 @@ namespace SqlSugar
|
|||||||
public virtual string ToJoinString(JoinQueryInfo joinInfo)
|
public virtual string ToJoinString(JoinQueryInfo joinInfo)
|
||||||
{
|
{
|
||||||
var name = joinInfo.TableName;
|
var name = joinInfo.TableName;
|
||||||
if (this.AsTables.Any(it => it.Key == name))
|
if (this.AsTables.Any())
|
||||||
{
|
{
|
||||||
if (this.Context.MappingTables != null && this.Context.MappingTables.Any(it => it.DbTableName == name))
|
if (this.Context.MappingTables != null && this.Context.MappingTables.Any(it => it.DbTableName == name))
|
||||||
{
|
{
|
||||||
name = this.Context.MappingTables.First(it => it.DbTableName == name).EntityName;
|
name = this.Context.MappingTables.First(it => it.DbTableName == name).EntityName;
|
||||||
}
|
}
|
||||||
name = this.AsTables.First(it => it.Key == name).Value;
|
if (this.AsTables.Any(it => it.Key == name))
|
||||||
|
{
|
||||||
|
name = this.AsTables.First(it => it.Key == name).Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return string.Format(
|
return string.Format(
|
||||||
this.JoinTemplate,
|
this.JoinTemplate,
|
||||||
|
|||||||
Reference in New Issue
Block a user