package com.ruixuan.jinniu.service.impl;

import com.ruixuan.jinniu.entity.KuaishouAdvertiser;
import com.ruixuan.jinniu.mapper.KuaishouAdvertiserMapper;
import com.ruixuan.jinniu.service.IKuaishouAdvertiserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 广告主Service业务层处理
 *
 * @author ruoyi
 * @date 2023-03-14
 */
@Service
public class KuaishouAdvertiserServiceImpl implements IKuaishouAdvertiserService {
    @Autowired
    private KuaishouAdvertiserMapper KuaishouAdvertiserMapper;

    /**
     * 查询广告主
     *
     * @param id 广告主主键
     * @return 广告主
     */
    @Override
    public KuaishouAdvertiser selectKuaishouAdvertiserById(Long id) {
        return KuaishouAdvertiserMapper.selectKuaishouAdvertiserById(id);
    }

    /**
     * 查询广告主列表
     *
     * @param kuaishouAdvertiser 广告主
     * @return 广告主
     */
    @Override
    public List<KuaishouAdvertiser> selectKuaishouAdvertiserList(KuaishouAdvertiser kuaishouAdvertiser) {
        return KuaishouAdvertiserMapper.selectKuaishouAdvertiserList(kuaishouAdvertiser);
    }

    /**
     * 新增广告主
     *
     * @param kuaishouAdvertiser 广告主
     * @return 结果
     */
    @Override
    public int insertKuaishouAdvertiser(KuaishouAdvertiser kuaishouAdvertiser) {
        return KuaishouAdvertiserMapper.insertKuaishouAdvertiser(kuaishouAdvertiser);
    }

    /**
     * 修改广告主
     *
     * @param kuaishouAdvertiser 广告主
     * @return 结果
     */
    @Override
    public int updateKuaishouAdvertiser(KuaishouAdvertiser kuaishouAdvertiser) {
        return KuaishouAdvertiserMapper.updateKuaishouAdvertiser(kuaishouAdvertiser);
    }

    /**
     * 删除广告主信息
     *
     * @param id 广告主主键
     * @return 结果
     */
    @Override
    public int deleteKuaishouAdvertiserById(Long id) {
        return KuaishouAdvertiserMapper.deleteKuaishouAdvertiserById(id);
    }
}