From c3d290fcd993ea844ffecb8bdd7ce2105fec3d0e Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 21 Jan 2021 12:01:04 +0800
Subject: [PATCH] 20210121
---
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java | 1235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 1,233 insertions(+), 2 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 a5ac62b..670653d 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
@@ -1,5 +1,7 @@
package com.xcong.excoin.modules.member.service.impl;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -396,6 +398,23 @@
QueryRequest request) {
Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinListInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(CollUtil.isNotEmpty(records)) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+
return findmemberQuickBuySaleListInPage;
}
@@ -408,6 +427,19 @@
List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
if(records != null && records.size() > 0) {
for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+
BigDecimal amount = memberCoinWithdrawVo.getAmount();
BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
BigDecimal subtract = amount.subtract(feeAmount);
@@ -567,7 +599,7 @@
}else {
selectById.setCertifyStatus(MemberEntity.CERTIFY_STATUS_N);
Map<String, Object> columnMap = new HashMap<>();
- columnMap.put("member_id", selectById);
+ columnMap.put("member_id", selectById.getId());
memberAuthenticationMapper.deleteByMap(columnMap);
}
selectById.setIdcardNo(memberAuthenticationEntity.getIdcardNo());
@@ -618,6 +650,10 @@
String walletNum = memberMapper.selectBBZCForBasicRealData();
String walletCoinNum = memberMapper.selectHYZCForBasicRealData();
String agentNum = memberMapper.selectDLZCForBasicRealData();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
double platformProfitAndLoss = 0 ;
platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
@@ -642,6 +678,7 @@
memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
}
selectMemberListInPage.setTotal(1);
return selectMemberListInPage;
@@ -803,6 +840,18 @@
BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
BigDecimal subtract = amount.subtract(feeAmount);
memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
}
}
return findmemberQuickBuySaleListInPage;
@@ -829,7 +878,7 @@
public IPage<MemberDataInfoVo> findMemberDataInfoAloneDtoListInPage(MemberEntity memberEntity,
QueryRequest request) {
Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
- IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.selectMemberDataInfoDtoListInPageAlone(page, memberEntity);
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.selectMemberDataInfoDtoRealListInPageAlone(page, memberEntity);
//USDT充币总额+USDT提币总额
String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealDataAlone();
String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealDataAlone();
@@ -859,6 +908,10 @@
String walletNum = memberMapper.selectBBZCForBasicRealDataAlone();
String walletCoinNum = memberMapper.selectHYZCForBasicRealDataAlone();
String agentNum = memberMapper.selectDLZCForBasicRealDataAlone();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
double platformProfitAndLoss = 0 ;
platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
@@ -883,6 +936,7 @@
memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
}
selectMemberListInPage.setTotal(1);
return selectMemberListInPage;
@@ -922,6 +976,10 @@
String walletNum = memberMapper.selectBBZCForBasicData();
String walletCoinNum = memberMapper.selectHYZCForBasicData();
String agentNum = memberMapper.selectDLZCForBasicData();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
double platformProfitAndLoss = 0 ;
platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
@@ -946,9 +1004,1182 @@
memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
}
selectMemberListInPage.setTotal(1);
return selectMemberListInPage;
}
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoAllAloneListInPage(MemberEntity memberEntity,
+ QueryRequest request) {
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.selectMemberDataInfoDtoListInPageAlone(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicAllDataAlone();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicAllDataAlone();
+ //USDT充值总额+USDT提现总额
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicAllDataAlone();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicAllDataAlone();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForBasicAllDataAlone();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForBasicAllDataAlone();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicAllDataAlone();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForBasicAllDataAlone();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForBasicAllDataAlone();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForBasicAllDataAlone();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForBasicAllDataAlone();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForBasicAllDataAlone();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForBasicAllDataAlone();
+ String walletCoinNum = memberMapper.selectHYZCForBasicAllDataAlone();
+ String agentNum = memberMapper.selectDLZCForBasicAllDataAlone();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberEntity> findMemberListTestInPage(MemberEntity member, QueryRequest request) {
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberEntity> selectMemberListInPage = this.baseMapper.findMemberListTestInPage(page, member);
+ List<MemberEntity> records = selectMemberListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberEntity memberEntitys : records) {
+ String firstName = (memberEntitys.getFirstName() == null ? "" : memberEntitys.getFirstName());
+ String secondName = (memberEntitys.getSecondName() == null ? "" : memberEntitys.getSecondName());
+ memberEntitys.setRealName(firstName+secondName);
+ }
+ }
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findMemberWithdrawCoinTestListInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findMemberWithdrawCoinTestListInPage(page, memberCoinWithdrawEntity);
+ List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+ BigDecimal amount = memberCoinWithdrawVo.getAmount();
+ BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
+ BigDecimal subtract = amount.subtract(feeAmount);
+ memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinAloneTestInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinAloneTestInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberEntity> findMemberAloneTestInPage(MemberEntity member, QueryRequest request) {
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberEntity> selectMemberListInPage = this.baseMapper.findMemberAloneTestInPage(page, member);
+ List<MemberEntity> records = selectMemberListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberEntity memberEntitys : records) {
+ String firstName = (memberEntitys.getFirstName() == null ? "" : memberEntitys.getFirstName());
+ String secondName = (memberEntitys.getSecondName() == null ? "" : memberEntitys.getSecondName());
+ memberEntitys.setRealName(firstName+secondName);
+ }
+ }
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoAloneTestDtoListInPage(MemberEntity memberEntity,
+ QueryRequest request) {
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoAloneTestDtoListInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealTestDataAlone();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealTestDataAlone();
+
+ //USDT充值总额+USDT提现总额
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealTestDataAlone();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealTestDataAlone();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForBasicRealTestDataAlone();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForBasicRealTestDataAlone();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicRealTestDataAlone();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForBasicRealTestDataAlone();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForBasicRealTestDataAlone();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForBasicRealTestDataAlone();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForBasicRealTestDataAlone();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForBasicRealTestDataAlone();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForBasicRealTestDataAlone();
+ String walletCoinNum = memberMapper.selectHYZCForBasicRealTestDataAlone();
+ String agentNum = memberMapper.selectDLZCForBasicRealTestDataAlone();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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)-6780));
+ platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoAllAloneTestListInPage(MemberEntity memberEntity,
+ QueryRequest request) {
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoAllAloneTestListInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealTestAllDataAlone();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealTestAllDataAlone();
+ //USDT充值总额+USDT提现总额
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealTestAllDataAlone();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealTestAllDataAlone();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForBasicRealTestAllDataAlone();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForBasicRealTestAllDataAlone();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicRealTestAllDataAlone();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForBasicRealTestAllDataAlone();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForBasicRealTestAllDataAlone();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForBasicRealTestAllDataAlone();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForBasicRealTestAllDataAlone();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForBasicRealTestAllDataAlone();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForBasicRealTestAllDataAlone();
+ String walletCoinNum = memberMapper.selectHYZCForBasicRealTestAllDataAlone();
+ String agentNum = memberMapper.selectDLZCForBasicRealTestAllDataAlone();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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)-6780));
+ platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public MemberInfoDetailVo selectMemberInfoDetailByInviteId(String inviteId) {
+ String id = memberMapper.selectMemberInfoDetailByInviteId(inviteId);
+ Long memberId = Long.parseLong(id);
+ MemberInfoDetailVo memberInfoDetailVo = new MemberInfoDetailVo();
+
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ //USDT充值总额+USDT提现总额
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ //总剩余
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberInfoDetailVo.setTotalCoin(platformProfitAndLoss);
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setFee(returnMoneyByMid == null ? 0 : Double.parseDouble(returnMoneyByMid));
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setClosingPrice(closingpriceByMid == null ? 0 : Double.parseDouble(closingpriceByMid));
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setSellClosingPrice(sellClosingpriceByMid == null ? 0 : Double.parseDouble(sellClosingpriceByMid));
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setPlatformProfitAndLoss(rewardratioByMid == null ? 0 : Double.parseDouble(rewardratioByMid));
+
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setDoingPrice(doingPrice == null ? 0 : Double.parseDouble(doingPrice));
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setWalletCoinNum(walletNum == null ? 0 : Double.parseDouble(walletNum));
+ String walletCoinNum = memberMapper.selectHYZCForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setTotalContract(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum));
+ String agentNum = memberMapper.selectDLZCForBasicRealDataBymemberId(memberId);
+ memberInfoDetailVo.setAgentNum(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ return memberInfoDetailVo;
+ }
+
+
+ @Override
+ public IPage<MemberEntity> memberDataInfoListSearchs(MemberEntity member, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberEntity> selectMemberListInPage = this.baseMapper.selectDataInfoListSearchs(page, member);
+ List<MemberEntity> records = selectMemberListInPage.getRecords();
+ Set<MemberEntity> set = new HashSet<>();
+ if(CollUtil.isNotEmpty(records)) {
+ if(StrUtil.isNotBlank(member.getAccount())) {
+ MemberEntity memberEntity = records.get(0);
+ //当前查询下级关系
+ String inviteId = memberEntity.getInviteId();
+ List<MemberEntity> members = memberMapper.selectMemberDataInfoListSearchs(inviteId);
+ if(CollUtil.isNotEmpty(members)) {
+ for(MemberEntity semberEntity : members) {
+ set.add(semberEntity);
+ }
+ }
+ //当前查询上级关系
+ String refererIds = memberEntity.getRefererIds();
+ String[] strs = refererIds.split(",");
+ if(ObjectUtil.isNotEmpty(strs)) {
+ for(int i=0,len=strs.length;i<len;i++){
+ String string = strs[i].toString();
+ if(StrUtil.isNotEmpty(string)) {
+ MemberEntity mem = memberMapper.selectMemberByInviteId(string);
+ set.add(mem);
+ }
+ }
+ }
+ }
+ if(set.size() > 0) {
+ records.addAll(set);
+ }
+ }
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinOneInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinOneInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinTwoInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinTwoInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinTeeInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinTeeInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinChargeVo> findMemberApplyCoinOneAllInPage(MemberCoinChargeEntity memberCoinChargeEntity,
+ QueryRequest request) {
+
+ Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinOneAllInPage(page, memberCoinChargeEntity);
+ List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinChargeVo memberCoinChargeVo : records) {
+ Long memberId = memberCoinChargeVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap );
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinChargeVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findMemberWithdrawCoinOneInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findMemberWithdrawCoinOneInPage(page, memberCoinWithdrawEntity);
+ List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+ BigDecimal amount = memberCoinWithdrawVo.getAmount();
+ BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
+ BigDecimal subtract = amount.subtract(feeAmount);
+ memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap);
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findMemberWithdrawCoinTwoInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findMemberWithdrawCoinTwoInPage(page, memberCoinWithdrawEntity);
+ List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+ BigDecimal amount = memberCoinWithdrawVo.getAmount();
+ BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
+ BigDecimal subtract = amount.subtract(feeAmount);
+ memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap);
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findMemberWithdrawCoinTeeInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findMemberWithdrawCoinTeeInPage(page, memberCoinWithdrawEntity);
+ List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+ BigDecimal amount = memberCoinWithdrawVo.getAmount();
+ BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
+ BigDecimal subtract = amount.subtract(feeAmount);
+ memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap);
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberCoinWithdrawVo> findMemberWithdrawCoinAllOneInPage(
+ MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) {
+
+ Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findMemberWithdrawCoinAllOneInPage(page, memberCoinWithdrawEntity);
+ List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords();
+ if(records != null && records.size() > 0) {
+ for(MemberCoinWithdrawVo memberCoinWithdrawVo : records) {
+ BigDecimal amount = memberCoinWithdrawVo.getAmount();
+ BigDecimal feeAmount = memberCoinWithdrawVo.getFeeAmount();
+ BigDecimal subtract = amount.subtract(feeAmount);
+ memberCoinWithdrawVo.setRealAmount(subtract);
+
+ Long memberId = memberCoinWithdrawVo.getMemberId();
+ Map<String, Object> columnMap = new HashMap<>();
+ columnMap.put("member_id", memberId);
+ List<MemberAuthenticationEntity> selectByMap = memberAuthenticationMapper.selectByMap(columnMap);
+ if(selectByMap != null && selectByMap.size() > 0) {
+ MemberAuthenticationEntity memberAuthenticationEntity = selectByMap.get(0);
+ String firstName = memberAuthenticationEntity.getFirstName();
+ String secondName = memberAuthenticationEntity.getSecondName();
+ String realName = firstName + secondName;
+ memberCoinWithdrawVo.setRealName(realName);
+ }
+ }
+ }
+ return findmemberQuickBuySaleListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoOneInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoOneInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoOne();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoOne();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoOne();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoOne();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoOne();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoOne();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoOne();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoOne();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoOne();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoOne();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoOne();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoOne();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoOne();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoOne();
+ String agentNum = memberMapper.selectDLZCForDataInfoOne();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoOneRealInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoOneRealInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoOneReal();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoOneReal();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoOneReal();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoOneReal();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoOneReal();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoOneReal();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoOneReal();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoOneReal();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoOneReal();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoOneReal();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoOneReal();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoOneReal();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoOneReal();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoOneReal();
+ String agentNum = memberMapper.selectDLZCForDataInfoOneReal();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoTwoInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoTwoInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoTwo();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoTwo();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoTwo();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoTwo();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoTwo();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoTwo();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoTwo();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoTwo();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoTwo();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoTwo();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoTwo();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoTwo();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoTwo();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoTwo();
+ String agentNum = memberMapper.selectDLZCForDataInfoTwo();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoTwoRealInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoTwoRealInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoTwoReal();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoTwoReal();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoTwoReal();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoTwoReal();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoTwoReal();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoTwoReal();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoTwoReal();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoTwoReal();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoTwoReal();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoTwoReal();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoTwoReal();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoTwoReal();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoTwoReal();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoTwoReal();
+ String agentNum = memberMapper.selectDLZCForDataInfoTwoReal();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoTeeInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoTeeInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoTee();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoTee();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoTee();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoTee();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoTee();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoTee();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoTee();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoTee();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoTee();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoTee();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoTee();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoTee();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoTee();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoTee();
+ String agentNum = memberMapper.selectDLZCForDataInfoTee();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoTeeRealInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoTeeRealInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoTeeReal();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoTeeReal();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoTeeReal();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoTeeReal();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoTeeReal();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoTeeReal();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoTeeReal();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoTeeReal();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoTeeReal();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoTeeReal();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoTeeReal();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoTeeReal();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoTeeReal();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoTeeReal();
+ String agentNum = memberMapper.selectDLZCForDataInfoTeeReal();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoOneAllInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoOneAllInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoOneAll();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoOneAll();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoOneAll();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoOneAll();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoOneAll();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoOneAll();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoOneAll();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoOneAll();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoOneAll();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoOneAll();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoOneAll();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoOneAll();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoOneAll();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoOneAll();
+ String agentNum = memberMapper.selectDLZCForDataInfoOneAll();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberDataInfoVo> findMemberDataInfoOneAllRealInPage(MemberEntity memberEntity, QueryRequest request) {
+
+ Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoOneAllRealInPage(page, memberEntity);
+ //USDT充币总额+USDT提币总额
+ String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForDataInfoOneAllReal();
+ String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForDataInfoOneAllReal();
+ String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForDataInfoOneAllReal();
+ String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForDataInfoOneAllReal();
+ //佣金
+ String returnMoneyByMid = memberMapper.selectReturnMoneyForDataInfoOneAllReal();
+ //开仓手续费总额
+ String closingpriceByMid = memberMapper.selectClosingpriceForDataInfoOneAllReal();
+ //平仓总手续费
+ String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForDataInfoOneAllReal();
+
+ //总盈亏
+ String rewardratioByMid = memberMapper.selectRewardratioForDataInfoOneAllReal();
+
+ //持仓人数
+ String notNullNumber = memberMapper.selectSFCCForDataInfoOneAllReal();
+ //币币账户不为空的人数
+ String walletNumber = memberMapper.selectBBZHForDataInfoOneAllReal();
+ //合约账户不为空的人数
+ String walletCoinNumber = memberMapper.selectHYZHForDataInfoOneAllReal();
+ //持仓手续费
+ String doingPrice = memberMapper.selectprepriceForDataInfoOneAllReal();
+
+ //账户金额
+ String walletNum = memberMapper.selectBBZCForDataInfoOneAllReal();
+ String walletCoinNum = memberMapper.selectHYZCForDataInfoOneAllReal();
+ String agentNum = memberMapper.selectDLZCForDataInfoOneAllReal();
+ double allCoin = 0 ;
+ allCoin = (walletNum == null ? 0 : Double.parseDouble(walletNum))
+ +(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
+ +(agentNum == null ? 0 : Double.parseDouble(agentNum));
+
+ 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 - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
+ for(MemberDataInfoVo memberDataInfoVo : records) {
+ memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
+ memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
+ memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
+ memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
+ memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
+ memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
+ memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
+ memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+ memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber);
+ memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber);
+ memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber);
+ memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0 ? "0" : platformProfitAndLoss+"");
+ memberDataInfoVo.setDoingPrice(doingPrice == null ? "0" : doingPrice);
+ memberDataInfoVo.setWalletNum(walletNum == null ? "0" : walletNum);
+ memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : walletCoinNum);
+ memberDataInfoVo.setAgentNum(agentNum == null ? "0" : agentNum);
+ memberDataInfoVo.setAllCoin(allCoin);
+ }
+ selectMemberListInPage.setTotal(1);
+ return selectMemberListInPage;
+ }
+
+
+ @Override
+ public IPage<MemberAccountMoneyChangeEntity> memberBoBiList(
+ MemberAccountMoneyChangeEntity memberAccountMoneyChangeEntity, QueryRequest request) {
+ Page<MemberAccountMoneyChangeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberAccountMoneyChangeEntity> findmemberQuickBuySaleListInPage = memberMapper.memberBoBiList(page, memberAccountMoneyChangeEntity);
+ return findmemberQuickBuySaleListInPage;
+ }
+
}
--
Gitblit v1.9.1