package com.wyz.demo.dao;

import com.wyz.demo.po.OrderPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderRepository {


    // 根据用户id查订单
    public List<OrderPO> getOrdersByUserId(int sender_id);


    // 提交订单
    public void addOrder(OrderPO orderPO);


    // 返回所有 未接单 的订单
    public List<OrderPO> getAllUnpickOrders();


    // 根据id查订单
    public OrderPO getOrderById(int id);


    // 有用户接单
    public void pickOrder(@Param("id") int order_id, @Param("receiver_id")int receiver_id);


}
