| | |
| | | |
| | | String invitationCode = getInvitationCode(); |
| | | UserAccount user = new UserAccount(); |
| | | if(dto.getAccountType() == 0 && StringUtils.isNotEmpty(dto.getInvitationCode()) && !dto.getInvitationCode().equals("000000")){ |
| | | if(dto.getAccountType() == 0 && StringUtils.isNotEmpty(dto.getInvitationCode()) && !dto.getInvitationCode().equals("00000000")){ |
| | | user = userAccountService.getOne(new LambdaQueryWrapper<UserAccount>() |
| | | .eq(UserAccount::getInvitationCode, dto.getInvitationCode()).last(" limit 1")); |
| | | if(ObjectUtil.isEmpty(user)){ |
| | |
| | | */ |
| | | public static String generateInvitationCode() { |
| | | Random random = new Random(); |
| | | int code = 100000 + random.nextInt(900000); |
| | | int code = 10000000 + random.nextInt(90000000); |
| | | return String.valueOf(code); |
| | | } |
| | | |