package com.fs.ad.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.ad.mapper.AdDyApiMapper;
import com.fs.ad.domain.AdDyApi;
import com.fs.ad.service.IAdDyApiService;

/**
 * 抖音投流API信息Service业务层处理
 * 
 * @author 吴树波
 * @date 2025-05-27
 */
@Service
public class AdDyApiServiceImpl extends ServiceImpl<AdDyApiMapper, AdDyApi> implements IAdDyApiService {

    /**
     * 查询抖音投流API信息
     * 
     * @param id 抖音投流API信息主键
     * @return 抖音投流API信息
     */
    @Override
    public AdDyApi selectAdDyApiById(Long id)
    {
        return baseMapper.selectAdDyApiById(id);
    }

    /**
     * 查询抖音投流API信息列表
     * 
     * @param adDyApi 抖音投流API信息
     * @return 抖音投流API信息
     */
    @Override
    public List<AdDyApi> selectAdDyApiList(AdDyApi adDyApi)
    {
        return baseMapper.selectAdDyApiList(adDyApi);
    }

    /**
     * 新增抖音投流API信息
     * 
     * @param adDyApi 抖音投流API信息
     * @return 结果
     */
    @Override
    public int insertAdDyApi(AdDyApi adDyApi)
    {
        adDyApi.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertAdDyApi(adDyApi);
    }

    /**
     * 修改抖音投流API信息
     * 
     * @param adDyApi 抖音投流API信息
     * @return 结果
     */
    @Override
    public int updateAdDyApi(AdDyApi adDyApi)
    {
        adDyApi.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateAdDyApi(adDyApi);
    }

    /**
     * 批量删除抖音投流API信息
     * 
     * @param ids 需要删除的抖音投流API信息主键
     * @return 结果
     */
    @Override
    public int deleteAdDyApiByIds(Long[] ids)
    {
        return baseMapper.deleteAdDyApiByIds(ids);
    }

    /**
     * 删除抖音投流API信息信息
     * 
     * @param id 抖音投流API信息主键
     * @return 结果
     */
    @Override
    public int deleteAdDyApiById(Long id)
    {
        return baseMapper.deleteAdDyApiById(id);
    }
}
