package org.dromara.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.domain.communityNews.CommentStars;
import org.dromara.domain.communityNews.vo.CommentStarsVo;

/**
 * 社区资讯收藏Mapper接口
 *
 * @author boman
 * @date 2025-04-11
 */
public interface CommentStarsMapper extends BaseMapperPlus<CommentStars, CommentStarsVo> {

    /**
     * 根据用户id和资讯id更新收藏状态 没删除就已收藏 删除=未收藏
     * @param commentStars
     * @return
     */
    @InterceptorIgnore(tenantLine = "true", dataPermission = "false")
    int updateCommentStarsByUserIdAndCommunityId (CommentStars commentStars);

}
