package com.bcxin.identify.util.sys;

import cn.hutool.core.util.ObjectUtil;

import java.util.HashMap;
import java.util.Map;

public class ConfigUtil {

	private static Map<String, String> data = new HashMap<String, String>();
	
	public static String getValue(String key) {
		String value = data.get(key);
		if (key.equalsIgnoreCase("material_path")) {
			value = "/data/upload/identify/";
		}
		if (key.equalsIgnoreCase("temp_path")) {
			//value = "D:\\test\\temp\\";
			value = "/data/upload/identify/temp/";
		}
		return value;
	}
	
	public static void putValue(String key,String value) {
		data.put(key, value);
	}

	public static Map<String, String> getData() {
		return data;
	}

	public static boolean isTestEnvi(){
		return ObjectUtil.equal(data.get("envi"),"test");
	}
	
}
