Skip to content

Commit

Permalink
修复数据集表达式两个以上条件解析不正确的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
youseries committed Mar 16, 2018
1 parent 0718463 commit 32af07c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,21 @@ protected BaseCondition buildConditions(ConditionsContext conditionsContext) {
List<ConditionContext> conditionContextList=conditionsContext.condition();
List<JoinContext> joins=conditionsContext.join();
BaseCondition condition=null;
BaseCondition topCondition=null;
int opIndex=0;
for(ConditionContext conditionCtx:conditionContextList){
if(condition==null){
condition=parseCondition(conditionCtx);
topCondition=condition;
}else{
BaseCondition nextCondition=parseCondition(conditionCtx);
condition.setNextCondition(nextCondition);
condition.setJoin(Join.parse(joins.get(opIndex).getText()));
opIndex++;
condition=nextCondition;
}
}
return condition;
return topCondition;
}
private BaseCondition parseCondition(ConditionContext context){
if(context instanceof ExprConditionContext){
Expand Down

0 comments on commit 32af07c

Please sign in to comment.