| | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.xcong.excoin.common.configure.FebsConfigure; |
| | | import com.xcong.excoin.common.entity.FebsResponse; |
| | | import com.xcong.excoin.common.entity.QueryRequest; |
| | | import com.xcong.excoin.modules.Sms106Send; |
| | |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | if(records != null && records.size() > 0) { |
| | | for(AgentFriendRelationEntity agentFriendRelation : records) { |
| | | String inviteId = agentFriendRelation.getInviteId(); |
| | | if("90457646".equals(inviteId)) { |
| | | if("rxadr3".equals(inviteId)) { |
| | | //该邀请码下的所有代理 |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("referer_id", "90457646"); |
| | | columnMap.put("referer_id", "rxadr3"); |
| | | List<AgentFriendRelationEntity> selectByMap = agentFriendRelationMapper.selectByMap(columnMap); |
| | | |
| | | if(selectByMap != null && selectByMap.size() > 0) { |
| | |
| | | @Override |
| | | public IPage<MemberCoinChargeVo> findMemberApplyCoinListInPage(MemberCoinChargeEntity memberCoinChargeEntity, |
| | | QueryRequest request) { |
| | | //查询条件 查询某条线下的所有数据 |
| | | String account = memberCoinChargeEntity.getAccount(); |
| | | //如果account为空,查询全部,account不为空查询对应的memberEntity |
| | | if(StrUtil.isNotEmpty(account)) { |
| | | MemberEntity selectMemberByAccount = memberMapper.selectMemberByAccount(account); |
| | | String inviteId = selectMemberByAccount.getInviteId(); |
| | | Long id = selectMemberByAccount.getId(); |
| | | memberCoinChargeEntity.setMemberId(id); |
| | | memberCoinChargeEntity.setInviteId(inviteId); |
| | | }else { |
| | | MemberEntity memberEntity = memberMapper.selectMemberByAccount(MemberEntity.SYSTEM_REFERER); |
| | | String inviteId = memberEntity.getInviteId(); |
| | | Long id = memberEntity.getId(); |
| | | memberCoinChargeEntity.setMemberId(id); |
| | | memberCoinChargeEntity.setInviteId(inviteId); |
| | | } |
| | | |
| | | Page<MemberCoinChargeEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<MemberCoinChargeVo> findmemberQuickBuySaleListInPage = memberCoinChargeMapper.findMemberApplyCoinListInPage(page, memberCoinChargeEntity); |
| | | List<MemberCoinChargeVo> records = findmemberQuickBuySaleListInPage.getRecords(); |
| | |
| | | @Override |
| | | public IPage<MemberCoinWithdrawVo> findmemberWithdrawCoinListInPage( |
| | | MemberCoinWithdrawEntity memberCoinWithdrawEntity, QueryRequest request) { |
| | | Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | //查询条件 查询某条线下的所有数据 |
| | | String account = memberCoinWithdrawEntity.getAccount(); |
| | | //如果account为空,查询全部,account不为空查询对应的memberEntity |
| | | if(StrUtil.isNotEmpty(account)) { |
| | | MemberEntity selectMemberByAccount = memberMapper.selectMemberByAccount(account); |
| | | String inviteId = selectMemberByAccount.getInviteId(); |
| | | Long id = selectMemberByAccount.getId(); |
| | | memberCoinWithdrawEntity.setMemberId(id); |
| | | memberCoinWithdrawEntity.setInviteId(inviteId); |
| | | }else { |
| | | MemberEntity memberEntity = memberMapper.selectMemberByAccount(MemberEntity.SYSTEM_REFERER); |
| | | String inviteId = memberEntity.getInviteId(); |
| | | Long id = memberEntity.getId(); |
| | | memberCoinWithdrawEntity.setMemberId(id); |
| | | memberCoinWithdrawEntity.setInviteId(inviteId); |
| | | } |
| | | |
| | | Page<MemberCoinWithdrawEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<MemberCoinWithdrawVo> findmemberQuickBuySaleListInPage = memberCoinWithdrawMapper.findmemberWithdrawCoinListInPage(page, memberCoinWithdrawEntity); |
| | | List<MemberCoinWithdrawVo> records = findmemberQuickBuySaleListInPage.getRecords(); |
| | | if(records != null && records.size() > 0) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Transactional |
| | | public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) { |
| | | |
| | | MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id); |
| | |
| | | |
| | | log.info("---->{}", phone); |
| | | if(StrUtil.isNotBlank(phone)) { |
| | | Sms106Send.sendWithdrawalCoinMsg(phone, time); |
| | | Sms106Send.sendWithdrawalCoinMsg(phone, new Date(), selectById.getAmount().toString()); |
| | | } |
| | | /** |
| | | //短信提醒 |
| | |
| | | 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)); |
| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | 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; |
| | |
| | | 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)); |
| | |
| | | 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; |
| | |
| | | //USDT充币总额+USDT提币总额 |
| | | String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealTestDataAlone(); |
| | | String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealTestDataAlone(); |
| | | |
| | | //USDT充值总额+USDT提现总额 |
| | | String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealTestDataAlone(); |
| | | String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealTestDataAlone(); |
| | |
| | | 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)); |
| | | 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)); |
| | | 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.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; |
| | |
| | | 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) { |
| | | 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.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); |
| | |
| | | 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; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MemberDataInfoVo> findAllDataInfoListInPage(MemberEntity memberEntity, QueryRequest request) { |
| | | String account = memberEntity.getAccount(); |
| | | String isTest = memberEntity.getIsTest(); |
| | | //如果account为空,查询全部,account不为空查询对应的memberEntity |
| | | if(StrUtil.isNotEmpty(account)) { |
| | | memberEntity = memberMapper.selectMemberByAccount(account); |
| | | }else { |
| | | memberEntity = memberMapper.selectMemberByAccount(MemberEntity.SYSTEM_REFERER); |
| | | } |
| | | memberEntity.setIsTest(isTest); |
| | | Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<MemberDataInfoVo> selectMemberListInPage = memberMapper.findMemberDataInfoOneAllRealInPage(page, memberEntity); |
| | | //USDT充币总额+USDT提币总额 |
| | | String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForAllDataInfo(memberEntity); |
| | | String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForAllDataInfo(memberEntity); |
| | | String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForAllDataInfo(memberEntity); |
| | | String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForAllDataInfo(memberEntity); |
| | | //佣金 |
| | | String returnMoneyByMid = memberMapper.selectReturnMoneyForAllDataInfo(memberEntity); |
| | | //开仓手续费 |
| | | String closingpriceByMid = memberMapper.selectClosingpriceForAllDataInfo(memberEntity); |
| | | //平仓总手续费 |
| | | String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForForAllDataInfo(memberEntity); |
| | | //总盈亏 |
| | | String rewardratioByMid = memberMapper.selectRewardratioForAllDataInfo(memberEntity); |
| | | |
| | | //持仓人数 |
| | | String notNullNumber = memberMapper.selectSFCCForAllDataInfo(memberEntity); |
| | | //币币账户不为空的人数 |
| | | String walletNumber = memberMapper.selectBBZHForAllDataInfo(memberEntity); |
| | | //合约账户不为空的人数 |
| | | String walletCoinNumber = memberMapper.selectHYZHForAllDataInfo(memberEntity); |
| | | //持仓手续费 |
| | | String doingPrice = memberMapper.selectprepriceForAllDataInfo(memberEntity); |
| | | |
| | | //账户金额 |
| | | String walletNum = memberMapper.selectBBZCForAllDataInfo(memberEntity); |
| | | String walletCoinNum = memberMapper.selectHYZCForAllDataInfo(memberEntity); |
| | | String agentNum = memberMapper.selectDLZCForAllDataInfo(memberEntity); |
| | | 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.00 ; |
| | | 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) { |
| | | DecimalFormat df = new DecimalFormat("0.00"); |
| | | 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 == "0" ? "0" : df.format(Double.parseDouble(closingpriceByMid))); |
| | | memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == "0" ? "0" : df.format(Double.parseDouble(sellClosingpriceByMid))); |
| | | memberDataInfoVo.setFee(returnMoneyByMid == "0" ? "0" : df.format(Double.parseDouble(returnMoneyByMid))); |
| | | memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : df.format(Double.parseDouble(rewardratioByMid))); |
| | | memberDataInfoVo.setNotNullNumber(notNullNumber == null ? "0" : notNullNumber); |
| | | memberDataInfoVo.setWalletNumber(walletNumber == null ? "0" : walletNumber); |
| | | memberDataInfoVo.setWalletCoinNumber(walletCoinNumber == null ? "0" : walletCoinNumber); |
| | | memberDataInfoVo.setPlatformProfitAndLoss(platformProfitAndLoss == 0.00 ? "0" : df.format(platformProfitAndLoss)); |
| | | memberDataInfoVo.setDoingPrice(doingPrice == "0" ? "0" : df.format(Double.parseDouble(doingPrice))); |
| | | memberDataInfoVo.setWalletNum(walletNum == null ? "0" : df.format(Double.parseDouble(walletNum))); |
| | | memberDataInfoVo.setWalletCoinNum(walletCoinNum == null ? "0" : df.format(Double.parseDouble(walletCoinNum))); |
| | | memberDataInfoVo.setAgentNum(agentNum == null ? "0" : df.format(Double.parseDouble(agentNum))); |
| | | memberDataInfoVo.setAllCoin(allCoin); |
| | | } |
| | | selectMemberListInPage.setTotal(1); |
| | | return selectMemberListInPage; |
| | | } |
| | | |
| | | } |