| | |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.LoginUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | |
| | | /** |
| | |
| | | * 获取用户缓存信息 |
| | | */ |
| | | public LoginUser getLoginUser() { |
| | | return SecurityUtils.getLoginUser(); |
| | | return LoginUtils.getLoginUser(); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录用户id |
| | | */ |
| | | public Long getUserId() { |
| | | return getLoginUser().getUserId(); |
| | | return LoginUtils.getUserId(); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录部门id |
| | | */ |
| | | public Long getDeptId() { |
| | | return getLoginUser().getDeptId(); |
| | | return LoginUtils.getDeptId(); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录用户名 |
| | | */ |
| | | public String getUsername() { |
| | | return getLoginUser().getUsername(); |
| | | return LoginUtils.getUsername(); |
| | | } |
| | | } |