package com.ruoyi.brewery.mapper;

import java.util.List;
import com.ruoyi.brewery.domain.WyBeerReview;
import com.ruoyi.common.core.domain.entity.WyBeerReviewScore;
import org.apache.ibatis.annotations.Param;

/**
 * 酒评Mapper接口
 *
 * @author ruoyi
 * @date 2024-12-21
 */
public interface WyBeerReviewMapper
{
    /**
     * 查询酒评
     *
     * @param id 酒评主键
     * @return 酒评
     */
    public WyBeerReview selectWyBeerReviewById(Long id);

    public WyBeerReview selectWyBeerReviewByBeerIdTop1(Long beerId);

    /**
     * 查询酒评列表
     *
     * @param wyBeerReview 酒评
     * @return 酒评集合
     */
    public List<WyBeerReview> selectWyBeerReviewList(WyBeerReview wyBeerReview);

    public WyBeerReviewScore selectWyBeerReviewScoreList(Long beerId);
    public List<WyBeerReviewScore> selectWyBeerReviewScoreAll();

    /**
     * 新增酒评
     *
     * @param wyBeerReview 酒评
     * @return 结果
     */
    public int insertWyBeerReview(WyBeerReview wyBeerReview);

    /**
     * 修改酒评
     *
     * @param wyBeerReview 酒评
     * @return 结果
     */
    public int updateWyBeerReview(WyBeerReview wyBeerReview);

    /**
     * 删除酒评
     *
     * @param id 酒评主键
     * @return 结果
     */
    public int deleteWyBeerReviewById(Long id);

    /**
     * 批量删除酒评
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWyBeerReviewByIds(Long[] ids);

    WyBeerReview selectWyBeerReviewByBeerIdAndCustomerId(@Param("beerId") Long beerId,@Param("userId") Long customerId);

    List<WyBeerReview> selectWyBeerReviewLists(WyBeerReview wyBeerReview);
}
