select
*
from
DM.CT_PRODUCT_PJLGD
WHERE (1=1)
${if(len('${B7}') = 0,"","AND FID in ('" + REPLACE('${B7}',",","','") + "')")}
上面这个有问题
${if(len(B7) = 0,"","AND FID in ('" + REPLACE(B7,",","','") + "')")}
--------
分别多了 $ 花括号 ' 三个字符