Update exp to sql

This commit is contained in:
sunkaixuan 2025-08-19 20:26:37 +08:00
parent a3c846c12e
commit 4704a49b8b

View File

@ -59,6 +59,10 @@ namespace SqlSugar
{
value = AppendOtherBool(parameter, isLeft, boolValue?" 1=1 ":" 1=2 ");
}
else if (isLeft==true&& value is bool isTrue && parameter?.BaseParameter?.BaseExpression is BinaryExpression binaryExpression&&binaryExpression.Left is UnaryExpression unaryExpression && unaryExpression.NodeType==ExpressionType.Not&&ExpressionTool.GetParameters(unaryExpression).Count==0)
{
value = AppendOtherBool(parameter, isLeft, isTrue ? " (1=1) " : " (1=2) ");
}
else
{
value = AppendOther(parameter, isLeft, value);