为啥里面加了一个if,外面这个参数就没有了,然后里面的if去掉,外面这个参数才能用 ${if((OA='1'),"select * from newsoft_cs.oa_wt_temp tmp left join newsoft_cs.oa_wt t on tmp.file_id = t.file_id where t.status in ('S','A','ST') and ${if(len(zt) == 0,"","and t.status in ('" + zt + "')")} ${if(len(dybh) == 0,"","and tmp.print_code in ('" + dybh + "')")} ${if(len(sfz) == 0,"","and tmp.user_id in ('" + sfz + "')")} ${if(len(khmc) == 0,"","and tmp.customer_name in ('" + khmc + "')")} ${if(len(strxm) == 0,"","and tmp.user_name in ('" + strxm + "')")} ${if(len(stime) == 0,"","and tmp.begin_time >= ('" + stime + "')")} ${if(len(etime) == 0,"","and tmp.end_time < ('" + etime + "')")} ", "select * from newsoft_cs.oa_wt_view WHERE 1=1 ${if(len(zt) == 0,"","and t.status in ('" + zt + "')")} ${if(len(dybh) == 0,"","and tmp.print_code in ('" + dybh + "')")} ${if(len(sfz) == 0,"","and tmp.user_id in ('" + sfz + "')")} ${if(len(khmc) == 0,"","and tmp.customer_name in ('" + khmc + "')")} ${if(len(strxm) == 0,"","and tmp.user_name in ('" + strxm + "')")} ${if(len(stime) == 0,"","and tmp.begin_time >= ('" + stime + "')")} ${if(len(etime) == 0,"","and tmp.end_time < ('" + etime + "')")} " )} |