| | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 安全服务工具类 |
| | |
| | | return passwordEncoder.encode(password); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String s = encryptPassword("111111"); |
| | | System.out.println(s); |
| | | } |
| | | /** |
| | | * 判断密码是否相同 |
| | | * |
| | |
| | | { |
| | | return userId != null && 1L == userId; |
| | | } |
| | | |
| | | /** |
| | | * 是否为供应商用户 |
| | | * @return |
| | | */ |
| | | public static boolean isAgentUser(){ |
| | | return Objects.isNull(getLoginUser().getUser().getRoleType()) || getLoginUser().getUser().getRoleType().equals(1); |
| | | } |
| | | } |