package com.ruoyi.bar.service.impl;

import com.ruoyi.bar.domain.WyFavoriteBeer;
import com.ruoyi.bar.domain.WyFavoriteBrewery;
import com.ruoyi.bar.mapper.WyFavoriteMapper;
import com.ruoyi.bar.service.IWyFavoriteService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WyFavoriteServiceImpl implements IWyFavoriteService {

    @Autowired
    private WyFavoriteMapper wyFavoriteMapper;

    @Override
    public List<WyFavoriteBeer> selectWyFavoriteBeerList(WyFavoriteBeer wyFavoriteBeer){
        return wyFavoriteMapper.selectWyFavoriteBeerList(wyFavoriteBeer);
    }

    @Override
    public WyFavoriteBeer selectWyFavoriteBeerByBeerIdAndUserId(@Param("beerId") Long beerId, @Param("userId") Long userId){
        return wyFavoriteMapper.selectWyFavoriteBeerByBeerIdAndUserId(beerId,userId);
    }
    @Override
    public int insertWyFavoriteBeer(WyFavoriteBeer wyFavoriteBeer){
        return wyFavoriteMapper.insertWyFavoriteBeer(wyFavoriteBeer);
    }
    @Override
    public int deleteWyFavoriteBeerByBeerIdAndUserId(Long beerId,Long userId){
        return wyFavoriteMapper.deleteWyFavoriteBeerByBeerIdAndUserId(beerId,userId);
    }
    @Override
    public List<WyFavoriteBrewery> selectWyFavoriteBreweryList(WyFavoriteBrewery wyFavoriteBrewery){
        return wyFavoriteMapper.selectWyFavoriteBreweryList(wyFavoriteBrewery);
    }
    @Override
    public WyFavoriteBrewery selectWyFavoriteBreweryByBreweryIdAndUserId(Long breweryId,Long userId){
        return wyFavoriteMapper.selectWyFavoriteBreweryByBreweryIdAndUserId(breweryId,userId);
    }
    @Override
    public int insertWyFavoriteBrewery(WyFavoriteBrewery wyFavoriteBrewery){
        return wyFavoriteMapper.insertWyFavoriteBrewery(wyFavoriteBrewery);
    }
    @Override
    public int deleteWyFavoriteBreweryByBreweryIdAndUserId(Long breweryId,Long userId){
        return wyFavoriteMapper.deleteWyFavoriteBreweryByBreweryIdAndUserId(breweryId,userId);
    }
}
