From 056bdbd515515e348e519f991444154512907392 Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期一, 26 五月 2025 16:28:51 +0800 Subject: [PATCH] add:影视作品增加用户信息 --- src/main/resources/mapper/film/FilmWorksMapper.xml | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/main/resources/mapper/film/FilmWorksMapper.xml b/src/main/resources/mapper/film/FilmWorksMapper.xml index 18d4e81..f3801ae 100644 --- a/src/main/resources/mapper/film/FilmWorksMapper.xml +++ b/src/main/resources/mapper/film/FilmWorksMapper.xml @@ -3,29 +3,42 @@ <mapper namespace="com.mzl.flower.mapper.film.FilmWorksMapper"> <select id="queryPage" resultType="com.mzl.flower.dto.response.film.FilmWorksVO"> - select t.* from film_works t where t.deleted= 0 + SELECT + t.*, + c.name AS nickname, + c.cover AS avatar + FROM + film_works t + LEFT JOIN + t_customer_info c + ON + t.create_by = c.user_id + WHERE + t.deleted = 0 <if test="dto.nameCn != null and dto.nameCn != ''"> - and t.name_cn like concat('%', #{dto.nameCn}, '%') + AND t.name_cn LIKE CONCAT('%', #{dto.nameCn}, '%') </if> <if test="dto.status != null and dto.status != ''"> - and t.status = #{dto.status} + AND t.status = #{dto.status} </if> <if test="dto.type != null and dto.type != ''"> - and t.type = #{dto.type} + AND t.type = #{dto.type} </if> <if test="dto.classify != null and dto.classify != ''"> - and t.classify = #{dto.classify} + AND t.classify = #{dto.classify} </if> - <if test="dto.createDateBegin!=null "> + <if test="dto.createDateBegin != null"> <![CDATA[ AND t.create_time >= #{dto.createDateBegin} ]]> </if> - <if test="dto.createDateEnd!=null "> + <if test="dto.createDateEnd != null"> <![CDATA[ AND t.create_time <= #{dto.createDateEnd} ]]> </if> - order by t.update_time desc + ORDER BY + t.update_time DESC </select> + </mapper> -- Gitblit v1.9.3