zainali5120
2020-11-15 1047866e4e73890bf64c9b35f1a7043b543d64fe
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -13,24 +13,8 @@
import com.xcong.excoin.modules.Sms106Send;
import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto;
import com.xcong.excoin.modules.member.dto.MemberLimitDto;
import com.xcong.excoin.modules.member.entity.AgentFriendRelationEntity;
import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
import com.xcong.excoin.modules.member.entity.MemberAuthenticationEntity;
import com.xcong.excoin.modules.member.entity.MemberCoinAddressEntity;
import com.xcong.excoin.modules.member.entity.MemberCoinChargeEntity;
import com.xcong.excoin.modules.member.entity.MemberCoinWithdrawEntity;
import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberQuickBuySaleEntity;
import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
import com.xcong.excoin.modules.member.mapper.AgentFriendRelationMapper;
import com.xcong.excoin.modules.member.mapper.MemberAccountMoneyChangeMapper;
import com.xcong.excoin.modules.member.mapper.MemberAuthenticationMapper;
import com.xcong.excoin.modules.member.mapper.MemberCoinAddressMapper;
import com.xcong.excoin.modules.member.mapper.MemberCoinChargeMapper;
import com.xcong.excoin.modules.member.mapper.MemberCoinWithdrawMapper;
import com.xcong.excoin.modules.member.mapper.MemberMapper;
import com.xcong.excoin.modules.member.mapper.MemberQuickBuySaleMapper;
import com.xcong.excoin.modules.member.mapper.MemberWalletCoinMapper;
import com.xcong.excoin.modules.member.entity.*;
import com.xcong.excoin.modules.member.mapper.*;
import com.xcong.excoin.modules.member.service.EthService;
import com.xcong.excoin.modules.member.service.IMemberService;
import com.xcong.excoin.modules.member.service.RocService;
@@ -89,6 +73,7 @@
   private final AgentFriendRelationMapper agentFriendRelationMapper;
   private final RedisUtils redisUtils;
   private final TdFinancialReordDao tdFinancialReordDao;
   @Override
   public IPage<AgentFriendRelationEntity> findAgentInfoListInPage(AgentFriendRelationEntity agentFriendRelationEntity,
@@ -441,6 +426,10 @@
      String symbol = selectById.getSymbol();
      String address = selectById.getAddress();
      int status = selectById.getStatus();
      BigDecimal feeAmount = selectById.getFeeAmount();
      if(feeAmount==null){
         feeAmount = BigDecimal.ZERO;
      }
      BigDecimal amount = selectById.getAmount();
      if(status != 1) {
         return new FebsResponse().fail().message("只有等待审核的状态才能确认!");
@@ -534,6 +523,23 @@
//            usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
//         }
//         String s = ethService.tokenSend(address, usdtStr, null);
          // 判断是不是到交易所的
          MemberCoinAddressEntity coinAddressEntity = memberCoinAddressMapper.selectSuanliWallet(address);
          if(coinAddressEntity!=null){
             // 是的
             Long walletId = coinAddressEntity.getId();
             // 插入充值记录
             TdFinancialReord financialReord = new TdFinancialReord();
             financialReord.setAmount(amount);
             financialReord.setTitle("USDT链上充值");
             financialReord.setContent("USDT链上充值");
             financialReord.setSymbol(symbol);
             financialReord.setCreateTime(new Date());
             financialReord.setMemId(coinAddressEntity.getMemberId());
             tdFinancialReordDao.insert(financialReord);
             // 更新钱包
             memberCoinAddressMapper.updateSuanliWallet(walletId,amount);
          }
      }
      /**