其实是为了方便正确拼接SQL
比如
SELECT * FROM TABLE WHERE 1=1 ${IF(LEN(控件1)==0,""," and 字段1='"+控件1+"'")} ${IF(LEN(控件2)==0,""," and 字段2='"+控件2+"'")}
它等效于
SELECT * FROM TABLE WHERE ${IF(LEN(控件1)==0,""," where 字段1='"+控件1+"'")} ${IF(LEN(控件2)==0,"",if(len(控件1)==0," where 字段2='"+控件2+"'"," and 字段2='"+控件2+"'"))}
第二种就明显容易拼接错误