package com.ruoyi.brewery.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.brewery.mapper.WyBreweryBannerMapper;
import com.ruoyi.brewery.domain.WyBreweryBanner;
import com.ruoyi.brewery.service.IWyBreweryBannerService;

/**
 * 品牌方广告图Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-21
 */
@Service
public class WyBreweryBannerServiceImpl implements IWyBreweryBannerService 
{
    @Autowired
    private WyBreweryBannerMapper wyBreweryBannerMapper;

    /**
     * 查询品牌方广告图
     * 
     * @param id 品牌方广告图主键
     * @return 品牌方广告图
     */
    @Override
    public WyBreweryBanner selectWyBreweryBannerById(Long id)
    {
        return wyBreweryBannerMapper.selectWyBreweryBannerById(id);
    }

    /**
     * 查询品牌方广告图列表
     * 
     * @param wyBreweryBanner 品牌方广告图
     * @return 品牌方广告图
     */
    @Override
    public List<WyBreweryBanner> selectWyBreweryBannerList(WyBreweryBanner wyBreweryBanner)
    {
        return wyBreweryBannerMapper.selectWyBreweryBannerList(wyBreweryBanner);
    }

    /**
     * 新增品牌方广告图
     * 
     * @param wyBreweryBanner 品牌方广告图
     * @return 结果
     */
    @Override
    public int insertWyBreweryBanner(WyBreweryBanner wyBreweryBanner)
    {
        wyBreweryBanner.setCreateTime(DateUtils.getNowDate());
        return wyBreweryBannerMapper.insertWyBreweryBanner(wyBreweryBanner);
    }

    /**
     * 修改品牌方广告图
     * 
     * @param wyBreweryBanner 品牌方广告图
     * @return 结果
     */
    @Override
    public int updateWyBreweryBanner(WyBreweryBanner wyBreweryBanner)
    {
        wyBreweryBanner.setUpdateTime(DateUtils.getNowDate());
        return wyBreweryBannerMapper.updateWyBreweryBanner(wyBreweryBanner);
    }

    /**
     * 批量删除品牌方广告图
     * 
     * @param ids 需要删除的品牌方广告图主键
     * @return 结果
     */
    @Override
    public int deleteWyBreweryBannerByIds(Long[] ids)
    {
        return wyBreweryBannerMapper.deleteWyBreweryBannerByIds(ids);
    }

    /**
     * 删除品牌方广告图信息
     * 
     * @param id 品牌方广告图主键
     * @return 结果
     */
    @Override
    public int deleteWyBreweryBannerById(Long id)
    {
        return wyBreweryBannerMapper.deleteWyBreweryBannerById(id);
    }
}
