From f7bb788026db3bb43e1156ce71b82ecaf8e75c32 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 05 六月 2025 09:27:20 +0800
Subject: [PATCH] fix:用户查询

---
 src/main/resources/mapper/film/CommentPoExMapper.xml |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/main/resources/mapper/film/CommentPoExMapper.xml b/src/main/resources/mapper/film/CommentPoExMapper.xml
index 183171c..52ccddd 100644
--- a/src/main/resources/mapper/film/CommentPoExMapper.xml
+++ b/src/main/resources/mapper/film/CommentPoExMapper.xml
@@ -14,41 +14,41 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        fs_comment.id, fs_comment.parent_id, fs_comment.content, fs_comment.film_id, fs_comment.`state`, fs_comment.deleted,
-        fs_comment.create_by, fs_comment.create_time, fs_comment.update_time
+        film_comments.id, film_comments.parent_id, film_comments.content, film_comments.film_id, film_comments.`state`, film_comments.deleted,
+        film_comments.create_by, film_comments.create_time, film_comments.update_time
     </sql>
 
     <select id="selectLatestComments" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List"/>
-        from fs_comment left join fs_article on fs_comment.film_id = fs_article.id
-        where fs_comment.deleted = 0
-        and fs_comment.state = 1
-        and fs_article.state = 1
-        and fs_article.deleted = 0
-        order by fs_comment.id desc
+        from film_comments left join film_works on film_comments.film_id = film_works.id  and film_works.status = 'published'
+        and film_works.deleted = 0
+        where film_comments.deleted = 0
+        and film_comments.state = 1
+
+        order by film_comments.id desc
     </select>
 
     <select id="getAllArticleComment" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List"/>
-        from fs_comment left join fs_article on fs_comment.film_id = fs_article.id
-        where fs_comment.deleted = 0
-        and fs_comment.state = 1
+        from film_comments left join fs_article on film_comments.film_id = fs_article.id
+        where film_comments.deleted = 0
+        and film_comments.state = 1
         and fs_article.state = 1
-        and fs_comment.create_time between #{startTime} and #{endTime}
-        and fs_comment.parent_id = 0
+        and film_comments.create_time between #{startTime} and #{endTime}
+        and film_comments.parent_id = 0
     </select>
 
     <select id="getAllCommentReply" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List"/>
-        from fs_comment left join fs_article on fs_comment.film_id = fs_article.id
-        where fs_comment.deleted = 0
-        and fs_comment.state = 1
+        from film_comments left join fs_article on film_comments.film_id = fs_article.id
+        where film_comments.deleted = 0
+        and film_comments.state = 1
         and fs_article.state = 1
-        and fs_comment.create_time between #{startTime} and #{endTime}
-        and fs_comment.parent_id != 0
+        and film_comments.create_time between #{startTime} and #{endTime}
+        and film_comments.parent_id != 0
     </select>
 
 </mapper>

--
Gitblit v1.9.3