package com.fs.baidu.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.baidu.mapper.BdCreativeMapper;
import com.fs.baidu.domain.BdCreative;
import com.fs.baidu.service.IBdCreativeService;

/**
 * 百度创意Service业务层处理
 * 
 * @author fs
 * @date 2025-01-20
 */
@Service
public class BdCreativeServiceImpl extends ServiceImpl<BdCreativeMapper, BdCreative> implements IBdCreativeService {

    /**
     * 查询百度创意
     * 
     * @param creativeFeedId 百度创意主键
     * @return 百度创意
     */
    @Override
    public BdCreative selectBdCreativeByCreativeFeedId(Long creativeFeedId)
    {
        return baseMapper.selectBdCreativeByCreativeFeedId(creativeFeedId);
    }

    /**
     * 查询百度创意列表
     * 
     * @param bdCreative 百度创意
     * @return 百度创意
     */
    @Override
    public List<BdCreative> selectBdCreativeList(BdCreative bdCreative)
    {
        return baseMapper.selectBdCreativeList(bdCreative);
    }

    /**
     * 新增百度创意
     * 
     * @param bdCreative 百度创意
     * @return 结果
     */
    @Override
    public int insertBdCreative(BdCreative bdCreative)
    {
        bdCreative.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertBdCreative(bdCreative);
    }

    /**
     * 修改百度创意
     * 
     * @param bdCreative 百度创意
     * @return 结果
     */
    @Override
    public int updateBdCreative(BdCreative bdCreative)
    {
        bdCreative.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateBdCreative(bdCreative);
    }

    /**
     * 批量删除百度创意
     * 
     * @param creativeFeedIds 需要删除的百度创意主键
     * @return 结果
     */
    @Override
    public int deleteBdCreativeByCreativeFeedIds(Long[] creativeFeedIds)
    {
        return baseMapper.deleteBdCreativeByCreativeFeedIds(creativeFeedIds);
    }

    /**
     * 删除百度创意信息
     * 
     * @param creativeFeedId 百度创意主键
     * @return 结果
     */
    @Override
    public int deleteBdCreativeByCreativeFeedId(Long creativeFeedId)
    {
        return baseMapper.deleteBdCreativeByCreativeFeedId(creativeFeedId);
    }
}
