package com.fs.course.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.course.domain.FsBlackTalent;
import com.fs.course.mapper.FsBlackTalentMapper;
import com.fs.course.param.FsBlackTalentAuditParam;
import com.fs.course.service.IFsBlackTalentService;
import com.fs.course.vo.FsBlackTalentPVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 达人或视频举报拉黑功能Service业务层处理
 * 
 * @author fs
 * @date 2025-08-17
 */
@Service
public class FsBlackTalentServiceImpl extends ServiceImpl<FsBlackTalentMapper, FsBlackTalent> implements IFsBlackTalentService {
    @Autowired
    private FsBlackTalentMapper blackTalentMapper;
    /**
     * 查询达人或视频举报拉黑功能
     * 
     * @param id 达人或视频举报拉黑功能主键
     * @return 达人或视频举报拉黑功能
     */
    @Override
    public FsBlackTalent selectFsBlackTalentById(Long id)
    {
        return baseMapper.selectFsBlackTalentById(id);
    }

    /**
     * 查询达人或视频举报拉黑功能列表
     * 
     * @param fsBlackTalent 达人或视频举报拉黑功能
     * @return 达人或视频举报拉黑功能
     */
    @Override
    public List<FsBlackTalentPVO> selectFsBlackTalentList(FsBlackTalent fsBlackTalent)
    {
        return blackTalentMapper.selectFsBlackTalentPVOList(fsBlackTalent);
    }

    /**
     * 新增达人或视频举报拉黑功能
     * 
     * @param fsBlackTalent 达人或视频举报拉黑功能
     * @return 结果
     */
    @Override
    public int insertFsBlackTalent(FsBlackTalent fsBlackTalent)
    {
        return baseMapper.insertFsBlackTalent(fsBlackTalent);
    }

    /**
     * 修改达人或视频举报拉黑功能
     * 
     * @param fsBlackTalent 达人或视频举报拉黑功能
     * @return 结果
     */
    @Override
    public int updateFsBlackTalent(FsBlackTalent fsBlackTalent)
    {
        return baseMapper.updateFsBlackTalent(fsBlackTalent);
    }

    /**
     * 批量删除达人或视频举报拉黑功能
     * 
     * @param ids 需要删除的达人或视频举报拉黑功能主键
     * @return 结果
     */
    @Override
    public int deleteFsBlackTalentByIds(Long[] ids)
    {
        return baseMapper.deleteFsBlackTalentByIds(ids);
    }

    /**
     * 删除达人或视频举报拉黑功能信息
     * 
     * @param id 达人或视频举报拉黑功能主键
     * @return 结果
     */
    @Override
    public int deleteFsBlackTalentById(Long id)
    {
        return baseMapper.deleteFsBlackTalentById(id);
    }

    @Override
    public int addBlack(FsBlackTalent blackTalent) {
        return blackTalentMapper.insertFsBlackTalent(blackTalent);
    }

    @Override
    public int deleteFsBlackVideo(String userId,String videoId) {
        return blackTalentMapper.deleteFsBlackVideo(userId,videoId);
    }

    @Override
    public int deleteFsBlackTalent(String userId,String talentId) {
        return blackTalentMapper.deleteFsBlackTalent(userId,talentId);
    }

    @Override
    public int audit(FsBlackTalentAuditParam fsBlackTalentAuditParam) {
        return blackTalentMapper.audit(fsBlackTalentAuditParam);
    }

    @Override
    public List<FsBlackTalent> selectBlackAndReportVideoIdsByUserId(Long userId) {
        return blackTalentMapper.selectBlackAndReportVideoIdsByUserId(userId);
    }

    @Override
    public int selectBlackTalent(Long talentId, Long loginUserId) {

        return blackTalentMapper.selectBlackTalent(talentId,loginUserId);
    }
}
