package com.gic.haoban.manage.web.utils;

import com.gic.clerk.api.dto.AuthorizedUser;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;

/**
 * @Author guojx
 * @Date 2024/5/30 10:59
 */
public class AuthorizedUserUtils {

    public static AuthorizedUser getUserInfo() {
        WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
        AuthorizedUser user = new AuthorizedUser();
        user.setUserId(loginUser.getClerkId());
        user.setEnterpriseId(loginUser.getEnterpriseId());
        user.setRealName(loginUser.getClerkName());
        return user;
    }
}
