| | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.yami.trading.common.constants.Constants; |
| | | import com.yami.trading.common.exception.YamiShopBindException; |
| | | import com.yami.trading.common.util.*; |
| | | import com.yami.trading.dao.CapitaltWalletMapper; |
| | | import com.yami.trading.dao.user.UserMapper; |
| | | import com.yami.trading.service.IdentifyingCodeTimeWindowService; |
| | | import com.yami.trading.service.MoneyLogService; |
| | | import com.yami.trading.service.OnlineUserService; |
| | | import com.yami.trading.service.*; |
| | | import com.yami.trading.service.data.DataService; |
| | | import com.yami.trading.service.system.LogService; |
| | | import com.yami.trading.service.user.UserDataService; |
| | | import com.yami.trading.service.user.UserRecomService; |
| | | import com.yami.trading.service.user.UserService; |
| | | import com.yami.trading.service.WalletService; |
| | | import com.yami.trading.service.syspara.SysparaService; |
| | | import com.yami.trading.service.user.WalletExtendService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | UserRecomService userRecomService; |
| | | @Autowired |
| | | WalletService walletService; |
| | | @Autowired |
| | | CapitaltWalletMapper capitaltWalletMapper; |
| | | @Autowired |
| | | PasswordEncoder passwordEncoder; |
| | | @Autowired |
| | |
| | | party.setUserCode(getUserCode()); |
| | | // party.setUserLevel(ever_user_level_num_custom * 10 + ever_user_level_num); |
| | | party.setUserLevel(userLevel); |
| | | party.setLoginPassword(this.passwordEncoder.encode(password)); |
| | | party.setSafePassword(this.passwordEncoder.encode(safeword)); |
| | | party.setRoleName(Constants.SECURITY_ROLE_MEMBER); |
| | | save(party); |
| | |
| | | Wallet wallet = new Wallet(); |
| | | wallet.setUserId(party.getUserId().toString()); |
| | | this.walletService.save(wallet); |
| | | //资金账户 |
| | | CapitaltWallet capitaltWallet = new CapitaltWallet(); |
| | | capitaltWallet.setUserId(party.getUserId().toString()); |
| | | capitaltWallet.setCreateTime(new Date()); |
| | | capitaltWalletMapper.insert(capitaltWallet); |
| | | if (party_reco != null) { |
| | | UserRecom userRecom = new UserRecom(); |
| | | userRecom.setUserId(party_reco.getUserId()); |
| | |
| | | if (user != null) { |
| | | throw new YamiShopBindException("账号已存在!"); |
| | | } |
| | | if (!isValidUsername(userName)) { |
| | | throw new YamiShopBindException("用户名不合法!"); |
| | | } |
| | | // if (!isValidUsername(userName)) { |
| | | // throw new YamiShopBindException("用户名不合法!"); |
| | | // } |
| | | user = new User(); |
| | | user.setUserName(userName); |
| | | } |
| | |
| | | wallet.setUserId(user.getUserId()); |
| | | wallet.setCreateTime(now); |
| | | walletService.save(wallet); |
| | | //资金账户 |
| | | CapitaltWallet capitaltWallet = new CapitaltWallet(); |
| | | capitaltWallet.setUserId(user.getUserId()); |
| | | capitaltWallet.setCreateTime(now); |
| | | capitaltWalletMapper.insert(capitaltWallet); |
| | | // |
| | | Log log = new Log(); |
| | | log.setCategory(Constants.LOG_CATEGORY_SECURITY); |