用户工具类
2.1.0
开始支持
需要和wueasy-gateway
结合使用,在bus接口中获取用户的信息。
使用场景:
- 获取用户访问的ip地址
- 获取用户登录后的
userId
- 获取用户的昵称
- 获取用户数据权限
- 获取是否管理员
接口说明
接口类com.wueasy.base.util.UserHelper
/**
* 获取用户id
* @author: fallsea
* @return
*/
public static String getUserId();
/**
* 获取用户id
* @author: fallsea
* @return
*/
public static Long getUserIdLong();
/**
* 获取用户姓名
* @author: fallsea
* @return
*/
public static String getUserName();
/**
* 获取用户登录账号
* @author: fallsea
* @return
*/
public static String getLoginNo();
/**
* 获取用户访问ip
* @author: fallsea
* @return
*/
public static String getIp();
/**
* 获取请求的唯一标识
* @author: fallsea
* @return
*/
public static String getRequestId();
/**
* 获取数据权限字符串
* @author: fallsea
* @return
*/
public static String getAuthDataStr();
/**
* 获取数据权限集合字符串
* @author: fallsea
* @return
*/
public static List<String> getAuthDataList();
/**
* 获取数据权限集合字符串
* @author: fallsea
* @return
*/
public static Set<String> getAuthDataSet();
/**
* 获取数据权限集合
* @author: fallsea
* @return
*/
public static List<Long> getAuthDataLongList();
/**
* 获取数据权限集合
* @author: fallsea
* @return
*/
public static Set<Long> getAuthDataLongSet();
/**
* 获取是否管理员
* @author: fallsea
* @return true 是
*/
public static boolean getIsSystem();
/**
* 获取自定义参数对象
* @author: fallsea
* @return
*/
public static DataMap getCustomParameterMap();
/**
* 获取语言代码
* @author: fallsea
* @return
*/
public static String getLanguage();
/**
* 获取系统参数
* @author: fallsea
* @return
*/
public static SystemParameterEntity getSystemParameter();