package com.bonus.canteen.core.order.service;

import com.bonus.canteen.core.order.domain.OrderInfo;
import com.bonus.canteen.core.order.domain.OrderRefundHistoryVO;
import com.bonus.canteen.core.order.domain.param.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单Service接口
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
public interface IOrderInfoService 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    public OrderInfo selectOrderInfoByOrderId(Long orderId);

    public OrderInfo selectOrderInfoBydeviceOrderId(String deviceOrderId);

    /**
     * 查询订单列表
     * 
     * @param orderInfo 订单
     * @return 订单集合
     */
    public List<OrderInfo> selectOrderInfoList(OrderQueryParam orderQueryParam);

    /**
     * 新增订单
     * 
     * @param
     * @return 结果
     */
    public int insertCanteenOrderInfo(OrderAddParam orderAddParam);
    public int insertDeviceOrderInfo(DeviceOrderAddParam orderAddParam);

    public int insertShopOrderInfo(ShopOrderAddParam orderAddParam);

    /**
     * 修改订单
     * 
     * @param orderInfo 订单
     * @return 结果
     */
    public int updateOrderInfo(OrderInfo orderInfo);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteOrderInfoByOrderIds(List<Long> orderIds);

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    public int deleteOrderInfoByOrderId(Long orderId);

    public void refund(Long orderId, String operationUser);
    public void pay(Long orderId);
    List<OrderRefundHistoryVO> orderRefundHistory(OrderRefundHistoryParam param);

    public void writeOffOrderByOrderIds(OrderWriteOffParam param);
}
