package com.sys.core.utils;
import com.sys.bus.hr.model.Person;
public class SessionUtil {
    private static ThreadLocal<Person> tl =  new ThreadLocal<Person>();
    private static ThreadLocal<Boolean> tl1 =  new ThreadLocal<Boolean>();
    private static ThreadLocal<Boolean> tl2 =  new ThreadLocal<Boolean>();
    public  static void setCurrentPerson(Person person) {
        tl.set(person);
    }
    public static Person getCurrentPerson() {
        return tl.get();
    }

    public static void  setAdmin(Boolean isAdmin){
        tl1.set(isAdmin);
    }
    public static Boolean isAdmin(){
        return tl1.get();
    }

    public static void  setJxjl(Boolean isJxjl){
        tl2.set(isJxjl);
    }
    public static Boolean isJxjl(){
        return tl2.get();
    }


    public static void remove() {
        tl.remove();
        tl1.remove();
        tl2.remove();
    }

}
