package com.ads.common.util;

import com.ads.business.service.data.GetLoginOutData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Return
 * @Author hou
 * @Date 2021/9/3 15:10
 * @Destription
 */
@Component
@Slf4j
public class OnlineUserUtils {

    private final static ThreadLocal<GetLoginOutData> threadLocal =  new ThreadLocal<>();

    public static void set(GetLoginOutData data){
        threadLocal.set(data);
    }

    public static GetLoginOutData get(){
        return threadLocal.get();
    }

}
