| 1234567891011121314151617181920212223 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <!-- 当Mapper接口和XML文件关联的时候,namespace的值就需要配置成接口的全限定名称 -->
- <mapper namespace="top.lvzhiqiang.mapper.VideoInfoUncensoredMapper">
- <select id="getVideoInfoUncensoredList" resultType="top.lvzhiqiang.entity.VideoInfo">
- select vi.id,vi.name,vi.identification_code,vi.issue_date,vi.modify_time,vi.img_url,vi.video_url,concat_ws('||', vi.cast, vi.genres) main_who,IFNULL(vio.score, 0) AS score, IFNULL(vio.comment, '暂无评论') AS comment
- from video_info_uncensored vi
- left join video_info_other vio on vi.identification_code = vio.identification_code and vio.delete_flag = 1
- where vi.delete_flag = 1
- <if test="keyword != null and keyword != ''">
- and (vi.name like #{keyword} or vi.identification_code like #{keyword})
- </if>
- <if test="genres != null and genres != ''">
- and vi.main_who = #{genres}
- </if>
- <if test="cast != null and cast != ''">
- and vi.cast like concat('%',#{cast},'%')
- </if>
- </select>
- </mapper>
|