| | |
| | | .set(SystemUser::getOpenidHkDate,null) |
| | | .set(SystemUser::getOpenidHkInfo,null) |
| | | .set(SystemUser::getOpenidHkStatus,Constants.ZERO) |
| | | .ne(SystemUser::getType,Constants.memberType.gkuser) |
| | | .eq(SystemUser::getOpenid,openid) |
| | | // .eq(SystemUser::getType,user.getType()) |
| | | ); |
| | | systemUserMapper.update(null,new UpdateWrapper<SystemUser>().lambda() |
| | | .set(SystemUser::getOpenid,openid) |
| | |
| | | throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); |
| | | } |
| | | //注册司机 |
| | | if(!((Constants.equalsInteger(user.getType(),Constants.ZERO) |
| | | 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{ |
| | | && Objects.nonNull(user.getMemberId())){ |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | if(Objects.isNull(user.getCompanyId())){ |
| | | throw new BusinessException(ResponseStatus.NO_ALLOW_LOGIN.getCode(),"对不起,该账号不能登录司机端哦~"); |
| | | } |
| | | /* 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.getCode(),"对不起,该账号不能登录司机端哦!"); |
| | | } |
| | | if(StringUtils.isNotBlank(password)){ |
| | | String pwd = Utils.Secure.encryptPassword(new String(password), user.getSalt()); |
| | |
| | | if (systemUser == null) { |
| | | systemUser = autoRegisterUser(Constants.memberType.driver,param.getPhone(),param.getOpenid(),true); |
| | | }else{ |
| | | if(!(Constants.equalsInteger(systemUser.getType(),Constants.memberType.driver)||Constants.equalsInteger(systemUser.getType(),Constants.memberType.internal))){ |
| | | if(!Constants.equalsInteger(systemUser.getType(),Constants.memberType.driver)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,请使用正确的司机账号登陆!"); |
| | | } |
| | | } |