package com.zm.order.tool.server.routing;

import com.zm.order.tool.server.model.RoutingOrder;
import com.zm.order.tool.server.model.TempOrder;
import com.zm.order.tool.server.query.OrderQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author penghui
 */
@Repository
public interface RoutingOrderDao {


    /**
     * 查询订单列表
     *
     * @param userId
     * @return
     */
    List<TempOrder> selectByUserId(@Param("userId") Long userId);

    /**
     * 根据单号查询
     *
     * @param orderNo
     * @param userId
     * @return
     */
    TempOrder selectByOrderNo(@Param("orderNo") String orderNo,
                              @Param("userId") Long userId);

    /**
     * 查询列表
     *
     * @param orderQuery 查询条件
     * @return
     */
    List<RoutingOrder> selectList(OrderQuery orderQuery);

}