mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-01-24 05:42:01 +08:00
Synchronization code
This commit is contained in:
@@ -291,7 +291,15 @@ namespace SqlSugar
|
||||
foreach (var item in whereColumns)
|
||||
{
|
||||
_WhereColumn(item);
|
||||
this.WhereColumnList.Add(item);
|
||||
var columnInfo=this.EntityInfo.Columns.FirstOrDefault(it => it.PropertyName.EqualCase(item));
|
||||
if (columnInfo != null)
|
||||
{
|
||||
this.WhereColumnList.Add(columnInfo.DbColumnName);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WhereColumnList.Add(item);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ namespace SqlSugar
|
||||
}
|
||||
var result = "COUNT(DISTINCT " + SubTools.GetMethodValue(Context, argExp, ResolveExpressType.WhereMultiple) + ")";
|
||||
var selfParameterName = Context.GetTranslationColumnName(parametres.First().Name) + UtilConstants.Dot;
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
if (this.Context.JoinIndex == 0)
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user