mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 21:27:58 +08:00
-
This commit is contained in:
parent
c8ecac5bb0
commit
c7c96b1efb
@ -294,5 +294,10 @@ namespace SqlSugar
|
||||
{
|
||||
return string.Join("", strings);
|
||||
}
|
||||
|
||||
public virtual string EqualTrue(string fieldName)
|
||||
{
|
||||
return "( " + fieldName + "=1 )";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,5 +52,6 @@ namespace SqlSugar
|
||||
string False();
|
||||
string GuidNew();
|
||||
string MergeString(params string[] strings);
|
||||
string EqualTrue(string value);
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ namespace SqlSugar
|
||||
fieldName = GetName(parameter, expression, isLeft, isSingle);
|
||||
if (expression.Type == UtilConstants.BoolType && baseParameter.OperatorValue.IsNullOrEmpty())
|
||||
{
|
||||
fieldName = "( " + fieldName + "=1 )";
|
||||
fieldName = this.Context.DbMehtods.EqualTrue(fieldName);
|
||||
}
|
||||
AppendMember(parameter, isLeft, fieldName);
|
||||
}
|
||||
@ -148,7 +148,7 @@ namespace SqlSugar
|
||||
string fieldName = GetName(parameter, expression.Expression as MemberExpression, isLeft, isSingle);
|
||||
if (expression.Type == UtilConstants.BoolType && baseParameter.OperatorValue.IsNullOrEmpty())
|
||||
{
|
||||
fieldName = "( " + fieldName + "=1 )";
|
||||
fieldName = this.Context.DbMehtods.EqualTrue(fieldName);
|
||||
}
|
||||
AppendMember(parameter, isLeft, fieldName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user