38 lines
1.7 KiB
XML
38 lines
1.7 KiB
XML
<?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>
|
|
<select id="getComment" resultType="com.mcwl.communityCenter.domain.vo.QuestionCommentVo">
|
|
select qm.*, u.nick_name as user_name, u.avatar
|
|
from cc_question_comment qm
|
|
left join sys_user u on qm.user_id = u.user_id
|
|
where qm.tenant_id = #{questionDetailRes.tenantId}
|
|
and qm.community_id = #{questionDetailRes.communityId}
|
|
and qm.question_id = #{questionDetailRes.questionId}
|
|
and qm.del_flag = '0'
|
|
order by qm.create_time desc
|
|
</select>
|
|
</mapper> |