<?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.mcwl.communityCenter.mapper.QuestionCommentMapper">


    <select id="selectByTenantIdAndCommunityIdAndQuestionIdPage"
            resultType="com.mcwl.communityCenter.domain.QuestionComment">
        select id, tenant_id, community_id, question_id, user_id, content, is_accept
        from cc_question_comment
        where tenant_id = #{tenantId}
          and community_id = #{communityId}
          and question_id = #{questionId}
          and del_flag = '0'
        order by create_time desc
    </select>
    <select id="selectByIdAndTenantIdAndCommunityIdAndQuestionIdAndCommentId"
            resultType="com.mcwl.communityCenter.domain.QuestionComment">
        select id, tenant_id, community_id, question_id, user_id, content, is_accept
        from cc_question_comment
        where id = #{commentId}
          and tenant_id = #{tenantId}
          and community_id = #{communityId}
          and question_id = #{questionId}
          and del_flag = '0'
    </select>
</mapper>