select * from dwd.t_dwd_input_inheat_info a
where 1=1 ${if(len(cbx_gpp) == 0,"","and gpp in( " + cbx_gpp + ")")}
${if(len(cbx_pml) == 0,"","and pml = '" + cbx_pml + "'")}
${if(len(cbx_sm_pml) == 0,"","and sm_pml = '" + cbx_sm_pml + "'")}
多选框的分隔符改成','
然后你涉及多选的要改成
${if(len(cbx_gpp) == 0,"","and gpp in( '" + cbx_gpp + "')")}
分隔符,换成 ','
还有in的语句需要改下,in的前后需要'号
where 1=1
${if(len(cbx_gpp) == 0,"","and gpp in('" + cbx_gpp + "')")}
分隔符改成 :','