package com.zsc.edu.gateway.framework.mybatisplus;

public class DataPermissionContext {

    private static final ThreadLocal<DataPermission> contextHolder = new ThreadLocal<>();

    public static void set(DataPermission dataPermission) {
        contextHolder.set(dataPermission);
    }

    public static DataPermission get() {
        return contextHolder.get();
    }

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