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.TCanteenOrderMapper;
import com.ruoyi.order.domain.TCanteenOrder;
import com.ruoyi.order.service.ITCanteenOrderService;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class TCanteenOrderServiceImpl implements ITCanteenOrderService 
{
    @Autowired
    private TCanteenOrderMapper tCanteenOrderMapper;

    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    @Override
    public TCanteenOrder selectTCanteenOrderByOrderId(Long orderId)
    {
        return tCanteenOrderMapper.selectTCanteenOrderByOrderId(orderId);
    }

    /**
     * 查询订单列表
     * 
     * @param tCanteenOrder 订单
     * @return 订单
     */
    @Override
    public List<TCanteenOrder> selectTCanteenOrderList(TCanteenOrder tCanteenOrder)
    {
        return tCanteenOrderMapper.selectTCanteenOrderList(tCanteenOrder);
    }

    /**
     * 新增订单
     * 
     * @param tCanteenOrder 订单
     * @return 结果
     */
    @Override
    public int insertTCanteenOrder(TCanteenOrder tCanteenOrder)
    {
        return tCanteenOrderMapper.insertTCanteenOrder(tCanteenOrder);
    }

    /**
     * 修改订单
     * 
     * @param tCanteenOrder 订单
     * @return 结果
     */
    @Override
    public int updateTCanteenOrder(TCanteenOrder tCanteenOrder)
    {
        return tCanteenOrderMapper.updateTCanteenOrder(tCanteenOrder);
    }

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenOrderByOrderIds(Long[] orderIds)
    {
        return tCanteenOrderMapper.deleteTCanteenOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    @Override
    public int deleteTCanteenOrderByOrderId(Long orderId)
    {
        return tCanteenOrderMapper.deleteTCanteenOrderByOrderId(orderId);
    }
}
