cloudroam
2025-06-05 f7bb788026db3bb43e1156ce71b82ecaf8e75c32
fix:用户查询
已修改2个文件
39 ■■■■ 文件已修改
src/main/java/com/mzl/flower/mapper/system/UserMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/film/CommentPoExMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mzl/flower/mapper/system/UserMapper.java
@@ -6,6 +6,7 @@
import com.mzl.flower.dto.response.sms.SmsSelectVO;
import com.mzl.flower.dto.response.system.UserListDTO;
import com.mzl.flower.dto.response.system.UserListInfoDTO;
import com.mzl.flower.dto.security.UserDTO;
import com.mzl.flower.entity.system.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -29,4 +30,6 @@
    List<SmsSelectVO> getSelectList(@Param("idList") List<String> idList);
    List<UserListInfoDTO> searchUserInfo(Page page, @Param("condition") SearchUserDTO dto);
    List<User> getByIds(List<String> userIds);
}
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>