|
|
@ -27,7 +27,8 @@ namespace SqlSugar |
|
|
|
var isDateDate = memberName == "Date" && expression.Expression.Type == UtilConstants.DateType; |
|
|
|
var isMemberValue = expression.Expression != null && expression.Expression.NodeType != ExpressionType.Parameter && !isValueBool; |
|
|
|
var isSingle = parameter.Context.ResolveType == ResolveExpressType.WhereSingle; |
|
|
|
|
|
|
|
var fieldIsBool = isBool && isLogicOperator; |
|
|
|
baseParameter.ChildExpression = expression; |
|
|
|
if (isLength) |
|
|
|
{ |
|
|
|
ResolveLength(parameter, isLeft, expression); |
|
|
@ -56,9 +57,12 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
ResolveMemberValue(parameter, baseParameter, isLeft, isSetTempData, expression); |
|
|
|
} |
|
|
|
else if (fieldIsBool) |
|
|
|
{ |
|
|
|
ResolvefieldIsBool(parameter, baseParameter, isLeft, isSetTempData, expression, isSingle); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
baseParameter.ChildExpression = expression; |
|
|
|
string fieldName = string.Empty; |
|
|
|
switch (parameter.Context.ResolveType) |
|
|
|
{ |
|
|
@ -165,6 +169,19 @@ namespace SqlSugar |
|
|
|
AppendValue(parameter, isLeft, value); |
|
|
|
} |
|
|
|
} |
|
|
|
private void ResolvefieldIsBool(ExpressionParameter parameter, ExpressionParameter baseParameter, bool? isLeft, bool isSetTempData, MemberExpression expression, bool isSingle) |
|
|
|
{ |
|
|
|
var fieldName = GetName(parameter, expression, isLeft, isSingle); |
|
|
|
if (isSetTempData) |
|
|
|
{ |
|
|
|
baseParameter.CommonTempData = fieldName; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
fieldName = this.Context.DbMehtods.EqualTrue(fieldName.ObjToString()); |
|
|
|
AppendMember(parameter, isLeft, fieldName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void ResolveDateDate(ExpressionParameter parameter, bool? isLeft, MemberExpression expression) |
|
|
|
{ |
|
|
|