以下紅色爲字段名
1.concat()函數修改mysql可以多個參數,oracle只能兩個參數,嵌套
mysql
<if test="address != null and address != ''">
AND xu.ADDRESS like concat('%',#{address,jdbcType=VARCHAR},'%')
</if>
oracle
<if test="address != null and address != ''">
AND xu.ADDRESS like concat(concat('%',#{address,jdbcType=VARCHAR}),'%')
</if>
2.設置時間
mysql
<if test="reviserDate != null and reviserDate != ''">
AND REVISER_DATE = #{reviserDate,jdbcType=VARCHAR}
</if>
oracle
<if test="reviserDate != null and reviserDate != ''">
AND REVISER_DATE = TO_DATE(#{reviserDate,jdbcType=VARCHAR},'yyyy-mm-dd hh24:mi:ss')
</if>
3.mysql 時間比較-oracle時間比較
mysql
字段名 TASK_FORCE_TIME
UNIX_TIMESTAMP(TASK_FORCE_TIME) >= UNIX_TIMESTAMP(#{tapeStartTimeStart,jdbcType=VARCHAR})
oracle
TASK_FORCE_TIME >= to_date(#{tapeStartTimeStart,jdbcType=VARCHAR}, 'yyyy-mm-dd hh24:mi:ss')