mcwl-ai/mcwl-communityCenter/src/main/resources/mapper/communityCenter/PublishCommentMapper.xml

53 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.PublishCommentMapper">
<update id="deleteByIdAndTenantIdAndCommunityIdAndOperatorId">
update cc_comment set del_flag = '2'
where tenant_id = #{tenantId}
and community_id = #{communityId}
and operator_id = #{operatorId}
and type = 0
</update>
<select id="selectByTenantIdAndCommunityIdAndOperatorId"
resultType="com.mcwl.communityCenter.domain.PublishComment">
select id,
tenant_id,
community_id,
operator_id,
user_id,
content,
parent_id,
type,
like_num,
create_time
from cc_comment
where tenant_id = #{tenantId}
and community_id = #{communityId}
and operator_id = #{operatorId}
and type = 0
and del_flag = '0'
order by create_time
</select>
<select id="selectByIdAndTenantIdAndCommunityIdAndOperatorId"
resultType="com.mcwl.communityCenter.domain.PublishComment">
select id,
tenant_id,
community_id,
operator_id,
user_id,
content,
parent_id,
type,
like_num,
create_time
from cc_comment
where tenant_id = #{tenantId}
and community_id = #{communityId}
and operator_id = #{operatorId}
and type = 0
and del_flag = '0'
</select>
</mapper>