From dca3e301410be4aee5a7895a1c2c1bbf90f3d03b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 16 Mar 2022 15:21:36 +0800
Subject: [PATCH] 20222223

---
 src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java b/src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java
index 125b974..c2ef66d 100644
--- a/src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java
+++ b/src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xcong.excoin.common.LoginUserUtils;
 import com.xcong.excoin.common.response.Result;
+import com.xcong.excoin.modules.member.dao.MemberDao;
 import com.xcong.excoin.modules.member.entity.MemberEntity;
 import com.xcong.excoin.modules.otc.dao.OtcReturnMoneyDao;
 import com.xcong.excoin.modules.otc.dto.*;
@@ -113,9 +114,10 @@
         MemberEntity member = LoginUserUtils.getAppLoginUser();
         IPage<TeamVo> data = otcReturnMoneyDao.selectMyTeamAmountInPage(member.getInviteId(), member.getId(), page);
         BigDecimal totalAmount = otcReturnMoneyDao.selectTotalAmount(member.getId());
+
         Map<String, Object> result = new HashMap<>();
         result.put("totalCnt", data.getTotal());
-        result.put("totalAmount", totalAmount);
+        result.put("totalAmount", totalAmount == null ? BigDecimal.ZERO : totalAmount.setScale(4, BigDecimal.ROUND_DOWN));
         result.put("result", data.getRecords());
         return Result.ok(result);
     }

--
Gitblit v1.9.1