select * from DM_BI_WKHKB where 1=1
${if(len(pt)=0,"","and pt in ('"+SUBSTITUTE(pt,",","','")+"')")}
根据你的语句改了下,你可以试一下。后面那个格式是 字段 in ('"+字段+"')