package org.jeecg.common.constant;

import org.jeecg.common.util.JsonResourceUtil;

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

/**
 *  Created by JQ.bi on 2020.5.30
 */
public class AccountReportConstants {

    /**
     * 私有构造器
     */
    private AccountReportConstants(){

    }

    /** 单体实例 */
    private static AccountReportConstants instance;


    /**
     * @return 返回 instance
     */
    public static AccountReportConstants getInstance() {
        if (instance == null) {
            instance = new AccountReportConstants();
        }
        return instance;
    }

    /** 字典数据 */
    public static Map<String, Map<String,Object>> dicMap = new HashMap<>();

    /**
     * 初始化字典
     */
    public void init(){
        //加载json文件
        Object json=JsonResourceUtil.getJsonObjFromResource("/json_template/bytedance_filed_mapping.json");
        //json 转为map存为静态常量
        dicMap=JsonResourceUtil.jsonToMap(json);
    }

}
