From 17b569ed8554e755c9e5feedf6e7882cdf2c8d01 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 16 Apr 2021 16:48:27 +0800
Subject: [PATCH] Merge branch 'activity' of http://120.27.238.55:7000/r/exchange into activity
---
src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 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 56dfeaf..d809951 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
@@ -161,6 +161,7 @@
FollowTraderProfitInfoEntity followTraderProfitInfoEntity = new FollowTraderProfitInfoEntity();
if(FollowTraderInfoEntity.IS_SETFRIST_Y.equals(type)) {
followTraderProfitInfoEntity.setType(type);
+ followTraderProfitInfoEntity.setTotalProfitRatioSc(2);
}else {
String nicknameDto = recordsPageDto.getNickname();
followTraderProfitInfoEntity.setNickname(nicknameDto);
@@ -216,6 +217,10 @@
FollowTraderProfitInfoVo.setDeclaration(declaration);
Integer isAll = followTraderInfoEntity.getIsAll();
FollowTraderProfitInfoVo.setIsAll(isAll);
+
+ Date entryTime = followTraderInfoEntity.getEntryTime();
+ int datePoor = getDatePoor(entryTime, new Date());
+ FollowTraderProfitInfoVo.setEntryDays(datePoor);
String labels = followTraderInfoEntity.getLabels();
if(StrUtil.isNotEmpty(labels)) {
@@ -405,7 +410,7 @@
myFollowOrderVo.setLeverRatio(leverRatio);
BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
myFollowOrderVo.setRewardAmount(rewardAmount);
- BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
+ BigDecimal rewardRatio = contractOrderEntity.getRewardRatio() == null ? BigDecimal.ZERO : contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
myFollowOrderVo.setRewardRatio(rewardRatio);
int symbolCnt = contractOrderEntity.getSymbolCnt();
myFollowOrderVo.setSymbolCnt(symbolCnt);
@@ -1032,7 +1037,11 @@
tradeProfitInfoVo.setTotalFollowerCnt(totalFollowerCnt);
BigDecimal totalOrderCnt = followTraderProfitInfoVo.getTotalOrderCnt();
tradeProfitInfoVo.setTotalOrderCnt(totalOrderCnt);
- }
+ BigDecimal thirtyProfitRatio = followTraderProfitInfoVo.getThirtyProfitRatio();
+ tradeProfitInfoVo.setThirtyProfitRatio(thirtyProfitRatio);
+ BigDecimal thirtyRatio = followTraderProfitInfoVo.getThirtyRatio();
+ tradeProfitInfoVo.setThirtyRatio(thirtyRatio);
+ }
return Result.ok(tradeProfitInfoVo);
}
@@ -1148,6 +1157,7 @@
BigDecimal rewardAmount = orderEntity.getRewardAmount();
allRewardAmount = allRewardAmount.add(rewardAmount);
BigDecimal rewardRatio = orderEntity.getRewardRatio();
+ rewardRatio = rewardRatio == null ? BigDecimal.ZERO : rewardRatio;
allRewardRatio = allRewardRatio.add(rewardRatio);
}
}
@@ -1170,7 +1180,7 @@
myFollowOrderVo.setLeverRatio(leverRatio);
BigDecimal rewardAmount = contractOrderEntity.getRewardAmount().setScale(2, BigDecimal.ROUND_DOWN);
myFollowOrderVo.setRewardAmount(rewardAmount);
- BigDecimal rewardRatio = contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
+ BigDecimal rewardRatio = contractOrderEntity.getRewardRatio() == null ? BigDecimal.ZERO : contractOrderEntity.getRewardRatio().setScale(4, BigDecimal.ROUND_DOWN);
myFollowOrderVo.setRewardRatio(rewardRatio);
int symbolCnt = contractOrderEntity.getSymbolCnt();
myFollowOrderVo.setSymbolCnt(symbolCnt);
--
Gitblit v1.9.1