From 7301846cc6b156b110b6d46bbc485b78dd166ede Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 26 Mar 2021 13:54:38 +0800
Subject: [PATCH] 20210323  后台短信发送

---
 src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 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 d91db61..8d5a337 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
@@ -44,6 +44,7 @@
 
 import lombok.RequiredArgsConstructor;
 import java.math.BigDecimal;
+import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -97,10 +98,10 @@
 		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) {
@@ -487,7 +488,7 @@
 	}
 
 	@Override
-	@Transactional(rollbackFor = Exception.class)
+	@Transactional
 	public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) {
 		
 		MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id);
@@ -496,7 +497,7 @@
 		String address = selectById.getAddress();
 		int status = selectById.getStatus();
 		if(status != 1) {
-			return new FebsResponse().fail().message("只有等待审核的状态才能确认!");
+			return new FebsResponse().message("只有等待审核的状态才能确认!");
 		}
 		
 		// 查询币币钱包
@@ -516,7 +517,7 @@
 			// 如果是内部转账 则需要将币加到内部地址
 			List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap);
 			if(selectByMap == null || selectByMap.isEmpty()) {
-				return new FebsResponse().fail().message("地址有误,请拒绝!");
+				return new FebsResponse().message("地址有误,请拒绝!");
 			}
 			Long aimMemberId = selectByMap.get(0).getMemberId();
 			MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol);
@@ -561,7 +562,7 @@
 
 		log.info("---->{}", phone);
 		if(StrUtil.isNotBlank(phone)) {
-			Sms106Send.sendWithdrawalCoinMsg(phone, time);
+			Sms106Send.sendWithdrawalCoinMsg(phone, new Date(), selectById.getAmount().toString());
 		}
 		/**
 		//短信提醒
@@ -2264,7 +2265,7 @@
 				+(walletCoinNum == null ? 0 : Double.parseDouble(walletCoinNum))
 				+(agentNum == null ? 0 : Double.parseDouble(agentNum));
 		
-		double platformProfitAndLoss = 0 ;
+		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));
@@ -2272,22 +2273,23 @@
 		
 		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 == null ? "0" : closingpriceByMid);
-			memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
-			memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
-			memberDataInfoVo.setYingkui(rewardratioByMid == null ? "0" : rewardratioByMid);
+			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 ? "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.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);

--
Gitblit v1.9.1