package com.quyunshuo.module.home.fragment.makefragment.utlis;

import com.quyunshuo.androidbaseframemvvm.common.bean.ShoppingCartBean;

import java.util.List;

public class OrderManagement {
    List<ShoppingCartBean> orderList;
    private static volatile OrderManagement singleton;

    private OrderManagement() {
    }

    public static OrderManagement getInstance() {
        if (singleton == null) {
            synchronized (OrderManagement.class) {
                if (singleton == null) {
                    singleton = new OrderManagement();
                }
            }
        }
        return singleton;
    }

    public void setOrderList(List<ShoppingCartBean> morderList) {
        orderList = morderList;

    }

    /**
     * 剩余订单
     */
    public List<ShoppingCartBean> getRemainingOrders() {
        return orderList;
    }

    public void RemoveFirstOrder() {
        if (orderList == null || orderList.size() <= 0) {
            return;
        }
        orderList.remove(0);
    }
}