package com.xxx.base.springframework.util;

import com.alibaba.ttl.TransmittableThreadLocal;
import com.xxx.base.springframework.vo.UserInfoVO;

public class UserUtil {

    private static TransmittableThreadLocal<UserInfoVO> userInfo = new TransmittableThreadLocal<>();

    private UserUtil() {
    }

    public static UserInfoVO getCurrentUser() {
        return userInfo.get();
    }

    public static void setCurrentUser(UserInfoVO user) {
        userInfo.set(user);
    }

}
