@@ -243,13 +243,17 @@ private void explanCond(String opear, SQLExpr expr, Where where) throws SqlParse
243
243
Object [] methodParametersValue = getMethodValuesWithSubQueries (method );
244
244
245
245
Condition condition = null ;
246
-
246
+ // fix OPEAR
247
+ Condition .OPEAR oper = Condition .OPEAR .methodNameToOpear .get (methodName );
248
+ if (soExpr .getOperator () == SQLBinaryOperator .LessThanOrGreater || soExpr .getOperator () == SQLBinaryOperator .NotEqual ) {
249
+ oper = oper .negative ();
250
+ }
247
251
if (isNested )
248
- condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), Condition . OPEAR . methodNameToOpear . get ( methodName ) , methodParametersValue , soExpr .getRight (), nestedType );
252
+ condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), oper , methodParametersValue , soExpr .getRight (), nestedType );
249
253
else if (isChildren )
250
- condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), Condition . OPEAR . methodNameToOpear . get ( methodName ) , methodParametersValue , soExpr .getRight (), childrenType );
254
+ condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), oper , methodParametersValue , soExpr .getRight (), childrenType );
251
255
else
252
- condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), Condition . OPEAR . methodNameToOpear . get ( methodName ) , methodParametersValue , soExpr .getRight (), null );
256
+ condition = new Condition (Where .CONN .valueOf (opear ), soExpr .getLeft ().toString (), soExpr .getLeft (), oper , methodParametersValue , soExpr .getRight (), null );
253
257
254
258
where .addWhere (condition );
255
259
methodAsOpear = true ;
0 commit comments