| | |
| | | |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.service.IUserService; |
| | | import com.ruoyi.common.core.service.UserService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | |
| | | **/ |
| | | public static SysUser getUser() { |
| | | try { |
| | | return SpringUtils.getBean(IUserService.class).selectUserById(getUserId()); |
| | | return SpringUtils.getBean(UserService.class).selectUserById(getUserId()); |
| | | } catch (Exception e) { |
| | | throw new ServiceException("获取用户信息异常", HttpStatus.HTTP_UNAUTHORIZED); |
| | | } |