package com.mcwl.communityCenter.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mcwl.communityCenter.domain.PublishComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：ChenYan
 * @Project：mcwl-ai
 * @Package：com.mcwl.communityCenter.mapper
 * @Filename：PublishCommissionMapper
 * @Description TODO
 * @Date：2025/1/17 14:29
 */
@Mapper
public interface PublishCommentMapper extends BaseMapper<PublishComment> {

    @InterceptorIgnore(tenantLine = "true")
    List<PublishComment> selectByTenantIdAndCommunityIdAndPublishIdList(@Param("tenantId")
                                                                     Long tenantId,
                                                                     @Param("communityId")
                                                                     Long communityId,
                                                                     @Param("publishId")
                                                                     Long publishId);


    @InterceptorIgnore(tenantLine = "true")
    PublishComment selectByIdAndTenantIdAndCommunityIdAndPublishId(@Param("id")
                                                                    Long id,
                                                                    @Param("tenantId")
                                                                    Long tenantId,
                                                                    @Param("communityId")
                                                                    Long communityId,
                                                                    @Param("publishId")
                                                                    Long publishId);

    @InterceptorIgnore(tenantLine = "true")
    Integer deleteByIdAndTenantIdAndCommunityIdAndOperatorId(@Param("id")
                                                             Long id,
                                                             @Param("tenantId")
                                                             Long tenantId,
                                                             @Param("communityId")
                                                             Long communityId,
                                                             @Param("publishId")
                                                             Long publishId);
}
