<select id="queryAllVideo" resultMap="BaseResultMap" parameterType="String">
select v.*,u.face_image as face_image,u.nickname as nickname from video v left join users u on u.id=v.user_id
where 1=1
<if test="videoDesc!=null and videoDesc !='' ">
and v.video_desc like '%${videoDesc}%'
</if>
and v.status=1 order by v.create_time desc
</select>
本文详细解析了一个使用MyBatis的视频查询接口代码,包括SQL映射语句的结构与动态SQL的运用,展示了如何通过左连接实现数据关联,并使用动态条件过滤和排序功能。
962

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



