package com.ruoyi.common.core.content;


import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.ExamType;

/**
 * 身份验证信息
 * 
 * @author ruoyi
 */
public class VistorContextHolder
{
    private static final ThreadLocal<SysUser> contextHolder = new ThreadLocal<>();

    public static SysUser getContext()
    {
        return contextHolder.get();
    }

    public static void setContext(SysUser context)
    {
        contextHolder.set(context);
    }

    public static void clearContext()
    {
        contextHolder.remove();
    }

    public static ExamType getExamType() {
        return getContext().getExamType();
    }

    public static String getLocation() {
        return getContext().getLocation();
    }
}
