From b90e825fab22d58a6ad6860bc0c4f5584e56a5e6 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 10 Nov 2020 16:31:57 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 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 7e350ff..b4f35f7 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 @@ -35,10 +35,7 @@ import com.xcong.excoin.modules.platform.dao.PlatformSymbolsCoinDao; import com.xcong.excoin.modules.platform.entity.PlatformFeeSettingEntity; import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity; -import com.xcong.excoin.utils.MessageSourceUtils; -import com.xcong.excoin.utils.RedisUtils; -import com.xcong.excoin.utils.ShareCodeUtil; -import com.xcong.excoin.utils.ThreadPoolUtils; +import com.xcong.excoin.utils.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -908,7 +905,7 @@ BigDecimal coinNumber = memberSubmitCoinApplyDto.getCoinNumber(); if (availableBalance.compareTo(BigDecimal.ZERO) > 0 && availableBalance.compareTo(coinNumber) >= 0) { - //新增提币记录 + //新增提币记录 MemberCoinWithdrawEntity memberCoinWithdrawEntity = new MemberCoinWithdrawEntity(); memberCoinWithdrawEntity.setAddress(memberSubmitCoinApplyDto.getAddress()); memberCoinWithdrawEntity.setAmount(coinNumber); @@ -917,12 +914,20 @@ memberCoinWithdrawEntity.setMemberId(memberId); memberCoinWithdrawEntity.setStatus(MemberCoinWithdrawEntity.STATUS_DOING); + if ("TRC20".equals(memberSubmitCoinApplyDto.getLable()) && CoinTypeEnum.USDT.name().equals(memberSubmitCoinApplyDto.getSymbol())) { + String orderNo = commonservice.generateOrderNo(memberId); + TRC20ApiUtils.coinApply(orderNo, memberId.toString(), CoinTypeEnum.USDT.name(), coinNumber.toPlainString(), memberSubmitCoinApplyDto.getAddress()); + memberCoinWithdrawEntity.setTag(orderNo); + memberCoinWithdrawEntity.setLabel("TRC20"); + } + Map<String, Object> columnMap = new HashMap<>(); columnMap.put("symbol", memberSubmitCoinApplyDto.getSymbol()); columnMap.put("address", memberSubmitCoinApplyDto.getAddress()); columnMap.put("is_biyict", MemberCoinAddressEntity.IS_BIYICT_YES); List<MemberCoinAddressEntity> selectByMap = memberCoinAddressDao.selectByMap(columnMap); - if (CollUtil.isEmpty(selectByMap)) { + TdCoinWallet tdCoinWallet = memberCoinAddressDao.selectTdCoinWalletByAddress(memberSubmitCoinApplyDto.getAddress(), CoinTypeEnum.USDT.name()); + if (CollUtil.isEmpty(selectByMap) && tdCoinWallet == null) { memberCoinWithdrawEntity.setIsInside(MemberCoinWithdrawEntity.ISINSIDE_NO); } else { memberCoinWithdrawEntity.setIsInside(MemberCoinWithdrawEntity.ISINSIDE_YES); -- Gitblit v1.9.1