mysql,oracle在mybatis模糊查询

mysql:

<if test="deviceType != null and deviceType != ''">and device_type like CONCAT('%', #{deviceType}, '%')</if>

oracle:

<if test="faultModeCode != null and faultModeCode != ''">

AND hqfmd.fault_mode_code LIKE '%' || #{faultModeCode} || '%'
</if>

 

posted @ 2018-03-05 11:30  jack_zou2018  阅读(305)  评论(0编辑  收藏  举报