mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
d76da4a40e
commit
62ec8491cf
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user