<select
id="getList"
parameterType="remotecollaborationDO"
resultType="remotecollaborationDO" >
SELECT t1.id,t1.send_user_id,t1.status,t1.content,t1.profile,
t1.contact_person,t1.contact_tel,t1.institute,t1.email,t1.comment,t2.real_name
FROM remote_collaboration t1
LEFT JOIN user_info t2
ON t1.send_user_id=t2.user_id
where 1=1
<if test="(status!=3 )" >
and status=#{status}
</if>
<if test="real_name!=null and real_name!='' " >
and real_name like CONCAT('%', trim(#{real_name}),'%')
</if>
<if test="(itemPerPage!=null and itemPerPage!=0 and startRow>=0)" >
limit #{startRow}, #{itemPerPage}
</if>
</select>ibatis 模糊查询和多条件查询
最新推荐文章于 2026-04-27 03:21:17 发布
本文介绍了一个使用MyBatis实现的复杂数据库查询案例,包括多表联查、条件过滤及分页等功能。通过动态SQL实现了灵活的查询逻辑,适用于远程协作信息的高效检索。

8万+

被折叠的 条评论
为什么被折叠?



