package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.mapper.SalesPromotionMapper;
import com.ruoyi.system.domain.SalesPromotion;
import com.ruoyi.system.service.ISalesPromotionService;

/**
 * SalesPromotionService业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-30
 */
@Service
public class SalesPromotionServiceImpl extends ServiceImpl<BaseMapper<SalesPromotion>,SalesPromotion> implements ISalesPromotionService
{
    @Autowired
    private SalesPromotionMapper salesPromotionMapper;

    /**
     * 查询SalesPromotion
     * 
     * @param id SalesPromotion主键
     * @return SalesPromotion
     */
    @Override
    public SalesPromotion selectSalesPromotionById(Long id)
    {
        return salesPromotionMapper.selectSalesPromotionById(id);
    }

    /**
     * 查询SalesPromotion列表
     * 
     * @param salesPromotion SalesPromotion
     * @return SalesPromotion
     */
    @Override
    public List<SalesPromotion> selectSalesPromotionList(SalesPromotion salesPromotion)
    {
        return salesPromotionMapper.selectSalesPromotionList(salesPromotion);
    }

    /**
     * 新增SalesPromotion
     * 
     * @param salesPromotion SalesPromotion
     * @return 结果
     */
    @Override
    public int insertSalesPromotion(SalesPromotion salesPromotion)
    {
        return salesPromotionMapper.insertSalesPromotion(salesPromotion);
    }

    /**
     * 修改SalesPromotion
     * 
     * @param salesPromotion SalesPromotion
     * @return 结果
     */
    @Override
    public int updateSalesPromotion(SalesPromotion salesPromotion)
    {
        return salesPromotionMapper.updateSalesPromotion(salesPromotion);
    }

    /**
     * 批量删除SalesPromotion
     * 
     * @param ids 需要删除的SalesPromotion主键
     * @return 结果
     */
    @Override
    public int deleteSalesPromotionByIds(Long[] ids)
    {
        return salesPromotionMapper.deleteSalesPromotionByIds(ids);
    }

    /**
     * 删除SalesPromotion信息
     * 
     * @param id SalesPromotion主键
     * @return 结果
     */
    @Override
    public int deleteSalesPromotionById(Long id)
    {
        return salesPromotionMapper.deleteSalesPromotionById(id);
    }
}
