package com.ruoyi.supplier.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TCanteenRatingMapper;
import com.ruoyi.supplier.domain.TCanteenRating;
import com.ruoyi.supplier.service.ITCanteenRatingService;

/**
 * 评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenRatingServiceImpl implements ITCanteenRatingService 
{
    @Autowired
    private TCanteenRatingMapper tCanteenRatingMapper;

    /**
     * 查询评价
     * 
     * @param rateId 评价主键
     * @return 评价
     */
    @Override
    public TCanteenRating selectTCanteenRatingByRateId(Long rateId)
    {
        return tCanteenRatingMapper.selectTCanteenRatingByRateId(rateId);
    }

    /**
     * 查询评价列表
     * 
     * @param tCanteenRating 评价
     * @return 评价
     */
    @Override
    public List<TCanteenRating> selectTCanteenRatingList(TCanteenRating tCanteenRating)
    {
        return tCanteenRatingMapper.selectTCanteenRatingList(tCanteenRating);
    }

    /**
     * 新增评价
     * 
     * @param tCanteenRating 评价
     * @return 结果
     */
    @Override
    public int insertTCanteenRating(TCanteenRating tCanteenRating)
    {
        return tCanteenRatingMapper.insertTCanteenRating(tCanteenRating);
    }

    /**
     * 修改评价
     * 
     * @param tCanteenRating 评价
     * @return 结果
     */
    @Override
    public int updateTCanteenRating(TCanteenRating tCanteenRating)
    {
        return tCanteenRatingMapper.updateTCanteenRating(tCanteenRating);
    }

    /**
     * 批量删除评价
     * 
     * @param rateIds 需要删除的评价主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenRatingByRateIds(Long[] rateIds)
    {
        return tCanteenRatingMapper.deleteTCanteenRatingByRateIds(rateIds);
    }

    /**
     * 删除评价信息
     * 
     * @param rateId 评价主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenRatingByRateId(Long rateId)
    {
        return tCanteenRatingMapper.deleteTCanteenRatingByRateId(rateId);
    }
}
