package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TCanteenOrderDetailMapper;
import com.ruoyi.order.domain.TCanteenOrderDetail;
import com.ruoyi.order.service.ITCanteenOrderDetailService;

/**
 * 订单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenOrderDetailServiceImpl implements ITCanteenOrderDetailService 
{
    @Autowired
    private TCanteenOrderDetailMapper tCanteenOrderDetailMapper;

    /**
     * 查询订单明细
     * 
     * @param detailId 订单明细主键
     * @return 订单明细
     */
    @Override
    public TCanteenOrderDetail selectTCanteenOrderDetailByDetailId(Long detailId)
    {
        return tCanteenOrderDetailMapper.selectTCanteenOrderDetailByDetailId(detailId);
    }

    /**
     * 查询订单明细列表
     * 
     * @param tCanteenOrderDetail 订单明细
     * @return 订单明细
     */
    @Override
    public List<TCanteenOrderDetail> selectTCanteenOrderDetailList(TCanteenOrderDetail tCanteenOrderDetail)
    {
        return tCanteenOrderDetailMapper.selectTCanteenOrderDetailList(tCanteenOrderDetail);
    }

    /**
     * 新增订单明细
     * 
     * @param tCanteenOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int insertTCanteenOrderDetail(TCanteenOrderDetail tCanteenOrderDetail)
    {
        return tCanteenOrderDetailMapper.insertTCanteenOrderDetail(tCanteenOrderDetail);
    }

    /**
     * 修改订单明细
     * 
     * @param tCanteenOrderDetail 订单明细
     * @return 结果
     */
    @Override
    public int updateTCanteenOrderDetail(TCanteenOrderDetail tCanteenOrderDetail)
    {
        return tCanteenOrderDetailMapper.updateTCanteenOrderDetail(tCanteenOrderDetail);
    }

    /**
     * 批量删除订单明细
     * 
     * @param detailIds 需要删除的订单明细主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenOrderDetailByDetailIds(Long[] detailIds)
    {
        return tCanteenOrderDetailMapper.deleteTCanteenOrderDetailByDetailIds(detailIds);
    }

    /**
     * 删除订单明细信息
     * 
     * @param detailId 订单明细主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenOrderDetailByDetailId(Long detailId)
    {
        return tCanteenOrderDetailMapper.deleteTCanteenOrderDetailByDetailId(detailId);
    }
}
