| | |
| | | if (StringUtils.isEmptyString(username) || username.length() > 20) { |
| | | throw new YamiShopBindException("请输入正确的手机号码"); |
| | | } |
| | | User partyPhone = findPartyByVerifiedPhone(username); |
| | | if (null != partyPhone) { |
| | | throw new YamiShopBindException("电话号码已绑定其他用户"); |
| | | } |
| | | this.savePhone(username, party.getUserId().toString()); |
| | | } else { |
| | | // 邮箱注册 |
| | |
| | | userRecom.setUserId(party_reco.getUserId()); |
| | | userRecom.setRecomUserId(party.getUserId()); |
| | | this.userRecomService.save(userRecom); |
| | | party = getById(party.getUserId()); |
| | | party.setUserRecom(party_reco.getUserId()); |
| | | updateById(party); |
| | | } |
| | |
| | | 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())) { |