where 1=1
这里少写了一个${if ('${指标}'=='B',
${if(len(编号1)==0,"","and 编号1 in ('"+编号1+"')")},
${if(len(编号2)==0,"","and 编号2 in ('"+编号2+"')")})}外层应该是 {}圈起来 用英文括号,刚刚是中文括号
用这个:
where 1=1${if(指标=='B',${if(len(编号1)==0,"","and 编号1 in ('"+编号1+"')")},${if(len(编号2)==0,"","and 编号2 in ('"+编号2+"')")})}