package com.yunzhupaas.util;

import com.yunzhupaas.permission.entity.UserEntity;


/**
 *
 * @author 云筑产品开发平台组
 * @copyright 深圳市乐程软件有限公司
 */
public class LoginHolder {


    private static final ThreadLocal<UserEntity> USER_CACHE = new ThreadLocal<>();

    public static UserEntity getUserEntity(){
        return USER_CACHE.get();
    }

    public static void setUserEntity(UserEntity userEntity){
        USER_CACHE.set(userEntity);
    }

    public static void clearUserEntity(){
        USER_CACHE.remove();
    }
}

