| | |
| | | if (user == null) { |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | //注册司机/劳务人员 |
| | | if((Constants.equalsInteger(user.getType(),Constants.ZERO)||Constants.equalsInteger(user.getType(),Constants.TWO)) && Objects.nonNull(user.getMemberId())){ |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | if(Objects.isNull(user.getCompanyId())){ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN); |
| | | } |
| | | Company company = companyMapper.selectById(user.getCompanyId()); |
| | | if(Objects.isNull(company) || Constants.equalsInteger(company.getType(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN); |
| | | } |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN); |
| | | } |
| | | |
| | | |
| | | String pwd = Utils.Secure.encryptPassword(new String(dto.getPassword()), user.getSalt()); |
| | | // 比较密码 |
| | | if( !StringUtils.equals(pwd, user.getPassword())){ |