mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
-
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user