package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OrderCommentMapper;
import com.ruoyi.system.domain.OrderComment;
import com.ruoyi.system.service.IOrderCommentService;

/**
 * 订单评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class OrderCommentServiceImpl implements IOrderCommentService 
{
    @Autowired
    private OrderCommentMapper orderCommentMapper;

    /**
     * 查询订单评价
     * 
     * @param id 订单评价主键
     * @return 订单评价
     */
    @Override
    public OrderComment selectOrderCommentById(Long id)
    {
        return orderCommentMapper.selectOrderCommentById(id);
    }

    public List<OrderComment>  selectOrderCommentByOid(Long id){
        return orderCommentMapper.selectOrderCommentByOid(id);
    }

    public int selectCountOrderCommentByOid(Long id){
        return orderCommentMapper.selectCountOrderCommentByOid(id);
    }

    /**
     * 查询订单评价列表
     * 
     * @param orderComment 订单评价
     * @return 订单评价
     */
    @Override
    public List<OrderComment> selectOrderCommentList(OrderComment orderComment)
    {
        return orderCommentMapper.selectOrderCommentList(orderComment);
    }

    /**
     * 新增订单评价
     * 
     * @param orderComment 订单评价
     * @return 结果
     */
    @Override
    public int insertOrderComment(OrderComment orderComment)
    {
        return orderCommentMapper.insertOrderComment(orderComment);
    }

    /**
     * 修改订单评价
     * 
     * @param orderComment 订单评价
     * @return 结果
     */
    @Override
    public int updateOrderComment(OrderComment orderComment)
    {
        return orderCommentMapper.updateOrderComment(orderComment);
    }

    /**
     * 批量删除订单评价
     * 
     * @param ids 需要删除的订单评价主键
     * @return 结果
     */
    @Override
    public int deleteOrderCommentByIds(Long[] ids)
    {
        return orderCommentMapper.deleteOrderCommentByIds(ids);
    }

    /**
     * 删除订单评价信息
     * 
     * @param id 订单评价主键
     * @return 结果
     */
    @Override
    public int deleteOrderCommentById(Long id)
    {
        return orderCommentMapper.deleteOrderCommentById(id);
    }
}
