| | |
| | | public static final String USER_NAME_KEY = "userName"; |
| | | public static final String DEPT_KEY = "deptId"; |
| | | public static final String DEPT_NAME_KEY = "deptName"; |
| | | public static final String DEPT_CATEGORY_KEY = "deptCategory"; |
| | | public static final String CLIENT_KEY = "clientid"; |
| | | |
| | | /** |
| | |
| | | .setExtra(USER_NAME_KEY, loginUser.getUsername()) |
| | | .setExtra(DEPT_KEY, loginUser.getDeptId()) |
| | | .setExtra(DEPT_NAME_KEY, loginUser.getDeptName()) |
| | | .setExtra(DEPT_CATEGORY_KEY, loginUser.getDeptCategory()) |
| | | ); |
| | | StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取部门名 |
| | | */ |
| | | public static String getDeptName() { |
| | | return Convert.toStr(getExtra(DEPT_NAME_KEY)); |
| | | } |
| | | |
| | | /** |
| | | * 获取部门类别编码 |
| | | */ |
| | | public static String getDeptCategory() { |
| | | return Convert.toStr(getExtra(DEPT_CATEGORY_KEY)); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前 Token 的扩展信息 |
| | | * |
| | | * @param key 键值 |