package com.liquidnet.service.order.utils;

import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import org.springframework.stereotype.Service;

@Service
public class TaobaoTicketUtils {

    private String URL = "http://gw.api.taobao.com/router/rest";
    private String APPKEY = "27542597";
    private String SECRET = "900025efc616fd2446344bb8fa21d039";
    private String SUPPLIER_SECRET= "444d0752439f921a75eaf5951a8bc03c";
    private Long SYSTEM_ID= 15669L;
    private TaobaoClient client = null;

    public TaobaoClient initTaobaoClient() {
        if (client == null) {
            client = new DefaultTaobaoClient(URL, APPKEY, SECRET);
        }
        return client;
    }

    public String getSupplierSecret(){
        return SUPPLIER_SECRET;
    }

    public Long getSystemId(){
        return SYSTEM_ID;
    }
}
