k94314517
2024-12-06 98802a28acb95a01058ae34c5d9b3985028c9399
server/system_service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
@@ -290,6 +290,22 @@
        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())){