From f214809a43aa8c1d1c2a6b65942be623aefb720b Mon Sep 17 00:00:00 2001 From: zainali5120 <512061637@qq.com> Date: Thu, 08 Oct 2020 13:59:46 +0800 Subject: [PATCH] ROC提币 --- src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java index 2d08898..b9b4bf5 100644 --- a/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java @@ -30,6 +30,7 @@ import com.xcong.excoin.modules.member.mapper.MemberQuickBuySaleMapper; import com.xcong.excoin.modules.member.mapper.MemberWalletCoinMapper; import com.xcong.excoin.modules.member.service.IMemberService; +import com.xcong.excoin.modules.member.service.RocService; import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo; import com.xcong.excoin.modules.member.vo.MemberCoinChargeVo; import com.xcong.excoin.modules.member.vo.MemberCoinWithdrawVo; @@ -458,6 +459,7 @@ String symbol = selectById.getSymbol(); String address = selectById.getAddress(); int status = selectById.getStatus(); + BigDecimal amount = selectById.getAmount(); if(status != 1) { return new FebsResponse().fail().message("只有等待审核的状态才能确认!"); } @@ -470,7 +472,7 @@ BigDecimal frozen = walletCoin.getFrozenBalance().subtract(selectById.getAmount()); walletCoin.setFrozenBalance(frozen); - memberWalletCoinMapper.updateById(walletCoin); + //memberWalletCoinMapper.updateById(walletCoin); if ("Y".equals(selectById.getIsInside())) { Map<String, Object> columnMap = new HashMap<>(); @@ -526,6 +528,11 @@ if(StrUtil.isNotBlank(phone)) { Sms106Send.sendWithdrawalCoinMsg(phone, time); } + if("ROC".equals(symbol)){ + // 如果是ROC 则自动转 + String transfer = RocService.transfer(amount, address, "ROC"); + } + /** //短信提醒 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); @@ -1214,7 +1221,7 @@ platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB)); platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ)); - platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS)); + platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780)); platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX)); List<MemberDataInfoVo> records = selectMemberListInPage.getRecords(); for(MemberDataInfoVo memberDataInfoVo : records) { @@ -1283,7 +1290,7 @@ double platformProfitAndLoss = 0 ; platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB)); platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ)); - platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS)); + platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780)); platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX)); List<MemberDataInfoVo> records = selectMemberListInPage.getRecords(); for(MemberDataInfoVo memberDataInfoVo : records) { -- Gitblit v1.9.1