package com.philisense.www.utils;

import java.util.Map;

public class GlobalUser {

    public static Map<String,Object> getUser(){
        return ActiveUserUtils.getActiveUserMap();
    }

    public static void setUser(Map<String,Object> user){
        ActiveUserUtils.setActiveUserMap(user);
    }

    public static void removeUser(){
        ActiveUserUtils.removeUser();
    }

    public static String getUserId(){
        return ActiveUserUtils.getUserId();
    }

    public static String getDeptId(){
        Map<String,Object> user= ActiveUserUtils.getActiveUserMap();
        if(user!=null){
            return (String)user.get("deptid");
        }
        return null;
    }

    public static String getUserName() {
        return ActiveUserUtils.getUserName();
    }

    public static String getUserNameCn() {
        return ActiveUserUtils.getUserNameCn();
    }

    public static String getUserValueByKey(String key) {
        return ActiveUserUtils.getUserValueByKey(key);
    }

    public static Integer getTenantId() {
       return ActiveUserUtils.getTenantId();
    }

    public static String getTenantName() {
        return ActiveUserUtils.getTenantName();
    }
}
