mybatis if判断
<where>
<if test="bznsTpId!=null and bznsTpId!=''">BZNS_TP_ID =#{bznsTpId}</if>
<if test="bznsTpName!=null and bznsTpName!=''"> and BZNS_TP_NAME like '%${bznsTpName}%'</if>
</where>
Mybatis-oracle时间范围查询
1.数据库类型date,传入是string
<![CDATA[ and g.create_time >= to_date(#{minCreateTime,jdbcType=DATE},'yyyy-MM-dd hh24:mi:ss')]]>
或者
AND CREATE_DT <![CDATA[>=]]> to_date(#{createBeginDt}, 'yyyyMMdd')
2.jdbcType为date,bean为String
3.同为字符串