package com.ruoyi.brewery.service.impl;

import com.ruoyi.brewery.domain.WyActivity;
import com.ruoyi.brewery.domain.WyActivityBeer;
import com.ruoyi.brewery.mapper.WyActivityBeerMapper;
import com.ruoyi.brewery.service.IWyActivityBeerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WyActivityBeerServiceImpl implements IWyActivityBeerService {
    @Resource
    private WyActivityBeerMapper wyActivityBeerMapper;

    @Override
    public List<WyActivityBeer> selectWyActivityBeerByActivityId(Long activityId){
        return wyActivityBeerMapper.selectWyActivityBeerByActivityId(activityId);
    }

    /**
     * 查询平台活动酒款列表
     *
     * @param wyActivityBeer 平台活动酒款
     * @return 平台活动酒款集合
     */
    @Override
    public List<WyActivityBeer> selectWyActivityBeerList(WyActivityBeer wyActivityBeer){
        return wyActivityBeerMapper.selectWyActivityBeerList(wyActivityBeer);
    }

    /**
     * 查询平台活动列表
     *
     */
    @Override
    public List<WyActivity> selectWyActivityListByBeerId(Long beerId, Long breweryId,Integer status){
        return wyActivityBeerMapper.selectWyActivityListByBeerId(beerId,breweryId, status);
    }

    /**
     * 新增平台活动酒款
     *
     * @param wyActivityBeer 平台活动酒款
     * @return 结果
     */
    @Override
    public int insertWyActivityBeer(WyActivityBeer wyActivityBeer){
        return wyActivityBeerMapper.insertWyActivityBeer(wyActivityBeer);
    }

    /**
     * 修改平台活动酒款
     *
     * @param wyActivityBeer 平台活动酒款
     * @return 结果
     */
    @Override
    public int updateWyActivityBeer(WyActivityBeer wyActivityBeer){
        return wyActivityBeerMapper.updateWyActivityBeer(wyActivityBeer);
    }

    /**
     * 删除平台活动酒款
     *
     * @param activityId 平台活动酒款主键
     * @return 结果
     */
    @Override
    public int deleteWyActivityBeerByActivityId(Long activityId){
        return wyActivityBeerMapper.deleteWyActivityBeerByActivityId(activityId);
    }

    /**
     * 批量删除平台活动酒款
     *
     * @param activityIds 需要删除的数据主键集合
     * @return 结果
     */
    @Override
    public int deleteWyActivityBeerByActivityIds(Long[] activityIds){
        return wyActivityBeerMapper.deleteWyActivityBeerByActivityIds(activityIds);
    }
}
