一样啊,直接把sql放到里面就可以啊
你里面还有${}这个,需要删除,然后参数需要拼接
=======================
${if(len(XXX)=0,"select * from 表 where 1=1 "
+if(len(ZGSCode) == 0,""," AND SUBSIDIARY_CODE = '" + ZGSCode + "'")
+if(len(FGSCode) == 0,""," AND BRANCH_CODE = '" + FGSCode + "'")
+if(len(CPDL) == 0,""," AND PRODUCT_CATEGORY in( '" + CPDL + "')"),
"1=2"
)}