| | |
| | | dappWalletCoinEntity.setAvailableAmount(AppContants.TOURIST_INIT_MONEY); |
| | | dappWalletCoinEntity.setFrozenAmount(AppContants.INIT_MONEY); |
| | | dappWalletCoinEntity.setTotalAmount(AppContants.TOURIST_INIT_MONEY); |
| | | dappWalletCoinEntity.setWalletCode("USDT"); |
| | | dappWalletCoinDao.insert(dappWalletCoinEntity); |
| | | } |
| | | |
| | |
| | | }else{ |
| | | memberInfoVo.setInviteId(dappMemberEntity.getInviteId()); |
| | | memberInfoVo.setIdentityCode(identity); |
| | | memberInfoVo.setIdentity("会员"); |
| | | memberInfoVo.setIdentity("Member"); |
| | | memberInfoVo.setUsername(dappMemberEntity.getUsername()); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(dappMemberEntity.getTransferCode())){ |
| | |
| | | dappWalletCoinEntity.setAvailableAmount(AppContants.INIT_MONEY); |
| | | dappWalletCoinEntity.setFrozenAmount(AppContants.INIT_MONEY); |
| | | dappWalletCoinEntity.setTotalAmount(AppContants.INIT_MONEY); |
| | | dappWalletCoinEntity.setWalletCode("USDT"); |
| | | dappWalletCoinDao.insert(dappWalletCoinEntity); |
| | | |
| | | return new FebsResponse().success().message(MessageSourceUtils.getString("register_err_006")); |
| | |
| | | return memberCoinChargeEntityIPage; |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse payUsdt(DappMemberEntity memberEntity) { |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberEntity.getId()); |
| | | if(ObjectUtil.isEmpty(dappMemberEntity)){ |
| | | return new FebsResponse().fail().message("会员信息不存在"); |
| | | } |
| | | BigDecimal coinNumber = memberEntity.getCoinNumber() == null ? BigDecimal.ZERO : memberEntity.getCoinNumber(); |
| | | if(BigDecimal.ZERO.compareTo(coinNumber) >= 0){ |
| | | return new FebsResponse().fail().message("请输入正确的金额"); |
| | | } |
| | | DappWalletCoinEntity dappWalletCoinEntity = dappWalletCoinDao.selectByMemberId(memberEntity.getId()); |
| | | if(ObjectUtil.isEmpty(dappWalletCoinEntity)){ |
| | | return new FebsResponse().fail().message("会员账户不存在"); |
| | | } |
| | | dappWalletCoinDao.addTotalAndaddAvailableById(dappWalletCoinEntity.getId(),coinNumber); |
| | | |
| | | DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = new DappAccountMoneyChangeEntity(memberEntity.getId(), coinNumber, "充值", 10); |
| | | dappAccountMoneyChangeDao.insert(dappAccountMoneyChangeEntity); |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | public String generateAsaToken(String token) { |
| | | RSA rsa = new RSA(null, AppContants.PUBLIC_KEY); |
| | | return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey); |