| | |
| | | import org.springframework.security.core.context.SecurityContextHolder;
|
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
| | | import com.ruoyi.common.constant.HttpStatus;
|
| | | import com.ruoyi.common.exception.CustomException;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.framework.security.LoginUser;
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw new CustomException("获取用户ID异常", HttpStatus.UNAUTHORIZED);
|
| | | throw new ServiceException("获取用户ID异常", HttpStatus.UNAUTHORIZED);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw new CustomException("获取部门ID异常", HttpStatus.UNAUTHORIZED);
|
| | | throw new ServiceException("获取部门ID异常", HttpStatus.UNAUTHORIZED);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw new CustomException("获取用户账户异常", HttpStatus.UNAUTHORIZED);
|
| | | throw new ServiceException("获取用户账户异常", HttpStatus.UNAUTHORIZED);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | throw new CustomException("获取用户信息异常", HttpStatus.UNAUTHORIZED);
|
| | | throw new ServiceException("获取用户信息异常", HttpStatus.UNAUTHORIZED);
|
| | | }
|
| | | }
|
| | |
|