From 83b3bf33bfd212723507fb70c3137c63cf8a6823 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期五, 30 五月 2025 13:17:33 +0800
Subject: [PATCH] add:影视作品点赞和评论点赞
---
src/main/resources/mapper/film/FilmWorksMapper.xml | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/src/main/resources/mapper/film/FilmWorksMapper.xml b/src/main/resources/mapper/film/FilmWorksMapper.xml
index 38fe88d..f3801ae 100644
--- a/src/main/resources/mapper/film/FilmWorksMapper.xml
+++ b/src/main/resources/mapper/film/FilmWorksMapper.xml
@@ -1,28 +1,44 @@
<?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 namespace="com.mzl.flower.mapper.filmwork.FilmWorksMapper">
+<mapper namespace="com.mzl.flower.mapper.film.FilmWorksMapper">
- <select id="queryPage" resultType="com.mzl.flower.dto.response.filmwork.FilmWorksVO">
- select t.* from film_works t where t.deleted= 0
+ <select id="queryPage" resultType="com.mzl.flower.dto.response.film.FilmWorksVO">
+ 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.createDateBegin!=null ">
+ <if test="dto.classify != null and dto.classify != ''">
+ AND t.classify = #{dto.classify}
+ </if>
+ <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