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.WyBeerReviewReplyMapper;
import com.ruoyi.brewery.domain.WyBeerReviewReply;
import com.ruoyi.brewery.service.IWyBeerReviewReplyService;

/**
 * 酒评回复Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-21
 */
@Service
public class WyBeerReviewReplyServiceImpl implements IWyBeerReviewReplyService 
{
    @Autowired
    private WyBeerReviewReplyMapper wyBeerReviewReplyMapper;

    /**
     * 查询酒评回复
     * 
     * @param id 酒评回复主键
     * @return 酒评回复
     */
    @Override
    public WyBeerReviewReply selectWyBeerReviewReplyById(Long id)
    {
        return wyBeerReviewReplyMapper.selectWyBeerReviewReplyById(id);
    }

    /**
     * 查询酒评回复列表
     * 
     * @param wyBeerReviewReply 酒评回复
     * @return 酒评回复
     */
    @Override
    public List<WyBeerReviewReply> selectWyBeerReviewReplyList(WyBeerReviewReply wyBeerReviewReply)
    {
        return wyBeerReviewReplyMapper.selectWyBeerReviewReplyList(wyBeerReviewReply);
    }

    /**
     * 新增酒评回复
     * 
     * @param wyBeerReviewReply 酒评回复
     * @return 结果
     */
    @Override
    public int insertWyBeerReviewReply(WyBeerReviewReply wyBeerReviewReply)
    {
        wyBeerReviewReply.setCreateTime(DateUtils.getNowDate());
        return wyBeerReviewReplyMapper.insertWyBeerReviewReply(wyBeerReviewReply);
    }

    /**
     * 修改酒评回复
     * 
     * @param wyBeerReviewReply 酒评回复
     * @return 结果
     */
    @Override
    public int updateWyBeerReviewReply(WyBeerReviewReply wyBeerReviewReply)
    {
        wyBeerReviewReply.setUpdateTime(DateUtils.getNowDate());
        return wyBeerReviewReplyMapper.updateWyBeerReviewReply(wyBeerReviewReply);
    }

    /**
     * 批量删除酒评回复
     * 
     * @param ids 需要删除的酒评回复主键
     * @return 结果
     */
    @Override
    public int deleteWyBeerReviewReplyByIds(Long[] ids)
    {
        return wyBeerReviewReplyMapper.deleteWyBeerReviewReplyByIds(ids);
    }

    /**
     * 删除酒评回复信息
     * 
     * @param id 酒评回复主键
     * @return 结果
     */
    @Override
    public int deleteWyBeerReviewReplyById(Long id)
    {
        return wyBeerReviewReplyMapper.deleteWyBeerReviewReplyById(id);
    }

    @Override
    public int deleteWyBeerReviewReplyByReviewId(Long reviewId)
    {
        return wyBeerReviewReplyMapper.deleteWyBeerReviewReplyByReviewId(reviewId);
    }
}
