From 4d33da83dcc57e0347e503958d0ad30a59f42ac9 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 02 Mar 2021 18:15:30 +0800
Subject: [PATCH] 20210302 我的跟单--我的跟单--历史跟单

---
 src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java |   72 +++++++++++++++++++-----------------
 1 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
index a087b45..2609225 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -221,7 +221,8 @@
         		historyOrderRecordsVo.setClosingPrice(closingPrice);
         		BigDecimal openingPrice = historyOrderRecordsVo.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
         		historyOrderRecordsVo.setOpeningPrice(openingPrice);
-        	}
+				historyOrderRecordsVo.setClosingTimeStamp(historyOrderRecordsVo.getClosingTime().getTime());
+			}
         }
 		return Result.ok(historyOrderRecordsVoList);
 	}
@@ -308,38 +309,41 @@
         			MyFollowOrderVo myFollowOrderVo = new MyFollowOrderVo();
         			//获取交易员信息
 					Long orderId = contractOrderEntity.getId();
-					myFollowOrderVo.setOrderId(orderId);
 					FollowFollowerOrderRelationEntity FollowFollowerOrderRelation = followFollowerOrderRelationDao.selectHistoryOneByorderId(orderId);
-					Long tradeId = FollowFollowerOrderRelation.getTradeId();
-					FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectById(tradeId);
-					String nickname = followTraderInfoEntity.getNickname();
-					myFollowOrderVo.setNickname(nickname);
-        			
-        			String symbol = contractOrderEntity.getSymbol();
-        			myFollowOrderVo.setSymbol(symbol);
-        			int orderType = contractOrderEntity.getOrderType();
-        			myFollowOrderVo.setOrderType(orderType);
-        			int leverRatio = contractOrderEntity.getLeverRatio();
-        			myFollowOrderVo.setLeverRatio(leverRatio);
-        			BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
-        			myFollowOrderVo.setRewardAmount(rewardAmount);
-        			BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
-        			myFollowOrderVo.setRewardRatio(rewardRatio);
-        			int symbolCnt = contractOrderEntity.getSymbolCnt();
-        			myFollowOrderVo.setSymbolCnt(symbolCnt);
-        			BigDecimal bondAmount = contractOrderEntity.getBondAmount().setScale(2, BigDecimal.ROUND_DOWN);
-        			myFollowOrderVo.setBondAmount(bondAmount);
-        			BigDecimal openingPrice = contractOrderEntity.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
-        			myFollowOrderVo.setOpeningPrice(openingPrice);
-        			BigDecimal closingPrice = contractOrderEntity.getClosingPrice().setScale(2, BigDecimal.ROUND_DOWN);
-        			myFollowOrderVo.setClosingPrice(closingPrice);
-        			Date openingTime = contractOrderEntity.getOpeningTime();
-        			myFollowOrderVo.setOpeningTime(openingTime);
-        			Date closingTime = contractOrderEntity.getClosingTime();
-        			myFollowOrderVo.setClosingTime(closingTime);
-        			String orderNo = contractOrderEntity.getOrderNo();
-        			myFollowOrderVo.setOrderNo(orderNo);
-        			myFollowOrderVos.add(myFollowOrderVo);
+					if(ObjectUtil.isNotEmpty(FollowFollowerOrderRelation)) {
+						myFollowOrderVo.setOrderId(orderId);
+						Long tradeId = FollowFollowerOrderRelation.getTradeId();
+						FollowTraderInfoEntity followTraderInfoEntity = followTraderInfoDao.selectById(tradeId);
+						if(ObjectUtil.isNotEmpty(followTraderInfoEntity)) {
+							String nickname = followTraderInfoEntity.getNickname();
+							myFollowOrderVo.setNickname(nickname);
+						}
+						String symbol = contractOrderEntity.getSymbol();
+						myFollowOrderVo.setSymbol(symbol);
+						int orderType = contractOrderEntity.getOrderType();
+						myFollowOrderVo.setOrderType(orderType);
+						int leverRatio = contractOrderEntity.getLeverRatio();
+						myFollowOrderVo.setLeverRatio(leverRatio);
+						BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
+						myFollowOrderVo.setRewardAmount(rewardAmount);
+						BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
+						myFollowOrderVo.setRewardRatio(rewardRatio);
+						int symbolCnt = contractOrderEntity.getSymbolCnt();
+						myFollowOrderVo.setSymbolCnt(symbolCnt);
+						BigDecimal bondAmount = contractOrderEntity.getBondAmount().setScale(2, BigDecimal.ROUND_DOWN);
+						myFollowOrderVo.setBondAmount(bondAmount);
+						BigDecimal openingPrice = contractOrderEntity.getOpeningPrice().setScale(2, BigDecimal.ROUND_DOWN);
+						myFollowOrderVo.setOpeningPrice(openingPrice);
+						BigDecimal closingPrice = contractOrderEntity.getClosingPrice().setScale(2, BigDecimal.ROUND_DOWN);
+						myFollowOrderVo.setClosingPrice(closingPrice);
+						Date openingTime = contractOrderEntity.getOpeningTime();
+						myFollowOrderVo.setOpeningTime(openingTime);
+						Date closingTime = contractOrderEntity.getClosingTime();
+						myFollowOrderVo.setClosingTime(closingTime);
+						String orderNo = contractOrderEntity.getOrderNo();
+						myFollowOrderVo.setOrderNo(orderNo);
+						myFollowOrderVos.add(myFollowOrderVo);
+					}
         		}
         	}
 		return Result.ok(myFollowOrderVos);
@@ -726,9 +730,9 @@
         String phone = memberEntity.getPhone();
         String email = memberEntity.getEmail();
         if(StrUtil.isNotEmpty(phone)) {
-        	followTraderInfoEntity.setNickname(phone);
+        	followTraderInfoEntity.setNickname(phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
         }else {
-        	followTraderInfoEntity.setNickname(email);
+        	followTraderInfoEntity.setNickname(email.replaceAll("(\\w?)(\\w+)(\\w)(@\\w+\\.[a-z]+(\\.[a-z]+)?)","$1****$3$4"));
         }
         followTraderInfoEntity.setDeclaration(FollowTraderInfoEntity.DECLARATION_DEFAULT);
         followTraderInfoEntity.setIsAll(FollowTraderInfoEntity.IS_ALL_N);

--
Gitblit v1.9.1