如题所述
第1个回答 推荐于2018-01-23
完全可以
<!-- 根据条件模糊查询 --><select id="findTrackerByPuzzy" parameterType="java.util.Map"
resultMap="trackerDevice_resultMap">
select
d.*,u.real_name as u_name
from tb_tracker_device d
left outer join
tb_user u
on u.id=d.user_id
<where>
<if test="condition !=null and condition !=''">
(d.tracker_id like
CONCAT('%',#{condition},'%')
or
d.number like
CONCAT('%',#{condition},'%')
or
d.imei like
CONCAT('%',#{condition},'%')
or
d.sim like
CONCAT('%',#{condition},'%')
or
d.telephone like
CONCAT('%',#{condition},'%')
or
(u.real_name like
CONCAT('%',#{condition},'%')
<if test="channel !=null">
and u.channel=#{channel}
</if>
))
</if>
<if test="channel !=null">
and d.channel=#{channel}
</if>
</where>
order by d.sync_time desc
</select>本回答被网友采纳
第2个回答 2017-08-23
不可以的。本回答被提问者采纳
第3个回答 2017-11-19
4K显示器吗
第4个回答 2015-01-08
这个还真没试过,应该是可以的,不过别把mapper搞的太复杂,以后维护的时候你会哭的