select
from os_biz_sec_waf_instance obw
where
obw.CUSTOMER_ID=#{customerId}
AND obw.IS_DELETE=#{isDelete}
AND obw.DESCRIPTION LIKE CONCAT(CONCAT(’%’,#{description}),’%’)
AND obw.ID=#{id,jdbcType=VARCHAR}
AND obw.PROPOSER = #{proposer}
AND obw.STATUS=#{status}
ORDER BY obw.CREATED_TIME DESC
${limitString}
where
obw.CUSTOMER_ID=#{customerId}
这一行如果加上and,异常,如果不加and,并且传入null也会报错。如果查询条件可以全部为空的时候,怎么写?