package com.liquidnet.service.order.utils;

import com.liquidnet.service.adam.dto.vo.AdamEntersVo;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinNftOrder;
import com.liquidnet.service.goblin.entity.GoblinOrderSku;
import com.liquidnet.service.goblin.entity.GoblinStoreOrder;
import com.liquidnet.service.goblin.param.BackCouponParam;
import com.liquidnet.service.goblin.param.GoblinOrderSqlParam;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo;
import com.liquidnet.service.kylin.entity.KylinOrderCoupons;
import com.mongodb.BasicDBObject;
import com.mongodb.client.model.WriteModel;
import org.bson.Document;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: ObjectUtil
 * @Package com.liquidnet.service.dragon.utils
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/7/21 16:00
 */
@Component
public class ObjectUtil {
    private static final LinkedList<Object[]> linkedListObj = new LinkedList<Object[]>();
    private static final LinkedList<String> linkedListStr = new LinkedList<String>();
    private static final HashMap<String, String> hashMapStringAndString = new HashMap<String, String>();
    private static final HashMap<String, Object> hashMapStringAndObject = new HashMap<String, Object>();
    private static final HashMap<String, Integer> hashMapStringAndInteger = new HashMap();
    private static final ArrayList<AdamEntersVo> arrayListObject = new ArrayList<>();
    private static final ArrayList<String> arrayListString = new ArrayList<>();
    private static final ArrayList<KylinOrderListVo> arrayKylinOrderListVo = new ArrayList<>();
    private static final ArrayList<KylinOrderListVo> arrayGoblinGoodsSkuInfoListVo = new ArrayList<>();
    private static final LinkedMultiValueMap<String, String> linkedMultiValueMapStringAndString = new LinkedMultiValueMap<String, String>();
    private static final BasicDBObject basicDBObject = new BasicDBObject();
    private static final ArrayList<KylinOrderCoupons> kylinOrderCouponsArrayList = new ArrayList<>();
    private static final ArrayList<GoblinOrderSqlParam> goblinOrderSqlParamArrayList = new ArrayList<>();
    private static final ArrayList<GoblinOrderSku> goblinOrderSkuArrayList = new ArrayList<>();
    private static final ArrayList<BackCouponParam> backCouponParam = new ArrayList<>();
    private static final ArrayList<GoblinMailVo> goblinMailVo = new ArrayList<>();
    private static final ArrayList<GoblinStoreOrderVo> goblinStoreOrderVoArrayList = new ArrayList<>();
    private static final ArrayList<GoblinOrderSkuVo> goblinOrderSkuVoArrayList = new ArrayList<>();
    private static final ArrayList<WriteModel<Document>> writeModelDocumentArrayList = new ArrayList<>();
    private static final ArrayList<GoblinUserCouponVo> goblinUserCouponVo = new ArrayList<>();
    private static final ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList = new ArrayList<>();
    private static final ArrayList<GoblinListCollectVo> goblinListCollectVo = new ArrayList<>();
    private static final ArrayList<GoblinNftOrder> goblinNftOrderList = new ArrayList<>();
    private static final ArrayList<GoblinGoodsSkuInfoVo> goblinGoodsSkuInfoVos = new ArrayList<>();
    private static final HashMap<String, List<GoblinStoreOrder>> hashMapSp = new HashMap();
    private static final HashMap<String, List<GoblinGoodsSkuInfoVo>> goblinGoodsSkuInfoVoMap = new HashMap();
    private static final HashMap<String, String[]> mixIdMap = new HashMap();
    private static final ArrayList<CouponOutLineVo> couponOutLineVo = new ArrayList<>();

    public static Object[] objectsArray;
    public static final Integer[] integerArray2 = new Integer[2];


    public static HashMap<String, String[]> mixIdMap() {
        return (HashMap<String, String[]>) mixIdMap.clone();
    }

    public static ArrayList<CouponOutLineVo> couponOutLineVo() {
        return (ArrayList<CouponOutLineVo>) couponOutLineVo.clone();
    }

    public static ArrayList<GoblinGoodsSkuInfoVo> goblinGoodsSkuInfoVos() {
        return (ArrayList<GoblinGoodsSkuInfoVo>) goblinGoodsSkuInfoVos.clone();
    }

    public static HashMap<String,List<GoblinGoodsSkuInfoVo>> goblinGoodsSkuInfoVoMap() {
        return (HashMap<String, List<GoblinGoodsSkuInfoVo>>) goblinGoodsSkuInfoVoMap.clone();
    }

    public static HashMap<String, List<GoblinStoreOrder>> hashMapSp() {
        return (HashMap<String, List<GoblinStoreOrder>>) hashMapSp.clone();
    }

    public static ArrayList<GoblinListCollectVo> getGoblinListCollectVo() {
        return (ArrayList<GoblinListCollectVo>) goblinListCollectVo.clone();
    }

    public static ArrayList<GoblinBackOrderSkuVo> goblinBackOrderSkuVoArrayList() {
        return (ArrayList<GoblinBackOrderSkuVo>) goblinBackOrderSkuVoArrayList.clone();
    }

    public static ArrayList<GoblinOrderSqlParam> getGoblinOrderSqlParamArrayListList() {
        return (ArrayList<GoblinOrderSqlParam>) goblinOrderSqlParamArrayList.clone();
    }

    public static ArrayList<GoblinOrderSkuVo> getGoblinOrderSkuVoArrayList() {
        return (ArrayList<GoblinOrderSkuVo>) goblinOrderSkuVoArrayList.clone();
    }

    public static ArrayList<GoblinUserCouponVo> getGoblinUserCouponVo() {
        return (ArrayList<GoblinUserCouponVo>) goblinUserCouponVo.clone();
    }

    public static ArrayList<GoblinMailVo> goblinMailVo() {
        return (ArrayList<GoblinMailVo>) goblinMailVo.clone();
    }


    public static LinkedList<Object[]> cloneLinkedListObj() {
        return (LinkedList<Object[]>) linkedListObj.clone();
    }

    public static LinkedList<String> cloneLinkedListStr() {
        return (LinkedList<String>) linkedListStr.clone();
    }

    public static HashMap<String, String> cloneHashMapStringAndString() {
        return (HashMap<String, String>) hashMapStringAndString.clone();
    }

    public static HashMap<String, Object> cloneHashMapStringAndObject() {
        return (HashMap<String, Object>) hashMapStringAndObject.clone();
    }

    public static ArrayList<BackCouponParam> getBackCouponParam() {
        return (ArrayList<BackCouponParam>) backCouponParam.clone();
    }

    public static HashMap<String, Integer> cloneHashMapStringAndInteger() {
        return (HashMap<String, Integer>) hashMapStringAndInteger.clone();
    }

    public static ArrayList<GoblinOrderSku> getGoblinOrderSkuArrayList() {
        return (ArrayList<GoblinOrderSku>) goblinOrderSkuArrayList.clone();
    }

    public static ArrayList<GoblinNftOrder> goblinNftOrderList() {
        return (ArrayList<GoblinNftOrder>) goblinNftOrderList.clone();
    }

    public static ArrayList<AdamEntersVo> cloneArrayListObject() {
        return (ArrayList<AdamEntersVo>) arrayListObject.clone();
    }

    public static ArrayList<KylinOrderListVo> cloneArrayKylinOrderListVo() {
        return (ArrayList<KylinOrderListVo>) arrayKylinOrderListVo.clone();
    }

    public static ArrayList<GoblinGoodsSkuInfoVo> cloneArrayGoblinGoodsSkuInfoListVo() {
        return (ArrayList<GoblinGoodsSkuInfoVo>) arrayGoblinGoodsSkuInfoListVo.clone();
    }

    public static ArrayList<String> cloneArrayListString() {
        return (ArrayList<String>) arrayListString.clone();
    }

    public static LinkedMultiValueMap<String, String> cloneLinkedMultiValueMapStringAndString() {
        return linkedMultiValueMapStringAndString.clone();
    }

    public static Object[] cloneObjectsArray(int size) {
        objectsArray = new Object[size];
        return objectsArray;
    }

    public static Integer[] cloneInteger2Array() {
        return integerArray2.clone();
    }

    public static BasicDBObject cloneBasicDBObject() {
        return (BasicDBObject) basicDBObject.clone();
    }

    public static ArrayList<GoblinStoreOrderVo> getGoblinStoreOrderVoArrayList() {
        return (ArrayList<GoblinStoreOrderVo>) goblinStoreOrderVoArrayList.clone();
    }

    public static ArrayList<KylinOrderCoupons> getKylinOrderCouponsArrayList() {
        return (ArrayList<KylinOrderCoupons>) kylinOrderCouponsArrayList.clone();
    }

    public static ArrayList<WriteModel<Document>> getWriteModelDocumentArrayList() {
        return (ArrayList<WriteModel<Document>>) writeModelDocumentArrayList.clone();
    }
}
