<?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.yida.data.school.atlas.mapper.CoreAtlasManagementDetailsCommentReplyMapper">
    <!-- app分页查询评论回复列表接口 -->
    <select id="listAtlasWorkCommentReplyPage"
            resultType="com.yida.data.school.vo.atlas.app.AppAtlasWorkCommentReplyPageVO">
        select id,
        content,
        create_date,
        user_id,
        user_name,
        nick_name
        from core_atlas_management_details_comment_reply
        where del_flag = 0
        and check_status = '1'
        and core_atlas_management_details_comment_id = #{dto.commentId}
        order by create_date desc
    </select>

    <!-- 查询评论回复列表数据 -->
    <select id="listAtlasDetailsCommentReplyPage"
            resultType="com.yida.data.school.vo.atlas.AtlasDetailsCommentReplySelectPageVO">
        select id,
        content,
        create_date,
        check_status,
        user_id,
        user_name,
        nick_name
        from core_atlas_management_details_comment_reply
        where del_flag = 0
        and core_atlas_management_details_comment_id = #{dto.commentId}
        <if test='dto.checkStatus != null and dto.checkStatus != ""'>
            and check_status = #{dto.checkStatus}
        </if>
        <if test='dto.content != null and dto.content != ""'>
            and content like concat('%', #{dto.content}, '%')
        </if>
        order by create_date desc
    </select>
</mapper>