mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
Code optimization
This commit is contained in:
parent
7af88bc649
commit
88cbb20d1c
@ -359,13 +359,16 @@ namespace SqlSugar
|
||||
public virtual string ToJoinString(JoinQueryInfo joinInfo)
|
||||
{
|
||||
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))
|
||||
{
|
||||
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(
|
||||
this.JoinTemplate,
|
||||
|
Loading…
Reference in New Issue
Block a user