From c953f1b7c1a71c7717f0eaad490504f26fafe99f Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 10 Jul 2020 15:03:20 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin
---
src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
index b396d14..2837bdf 100644
--- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java
@@ -322,15 +322,21 @@
List<OrderCoinsEntity> findCoinOrderListByMemberIdAndSysmbol = orderCoinsDao.findCoinOrderListByMemberIdAndSysmbol(memberId, symbol, status);
if (CollUtil.isNotEmpty(findCoinOrderListByMemberIdAndSysmbol)) {
for (OrderCoinsEntity orderCoinsEntity : findCoinOrderListByMemberIdAndSysmbol) {
- orderCoinsEntity.setFeeAmount(orderCoinsEntity.getFeeAmount().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setMarkPrice(orderCoinsEntity.getMarkPrice().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setEntrustCnt(orderCoinsEntity.getEntrustCnt().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setEntrustPrice(orderCoinsEntity.getEntrustPrice().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setDealCnt(orderCoinsEntity.getDealCnt().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setDealPrice(orderCoinsEntity.getDealPrice().setScale(4, BigDecimal.ROUND_DOWN));
- orderCoinsEntity.setDealAmount(orderCoinsEntity.getDealAmount().setScale(4, BigDecimal.ROUND_DOWN));
-
OrderWalletCoinVo entityToVo = OrderWalletCoinMapper.INSTANCE.entityToVo(orderCoinsEntity);
+ entityToVo.setFeeAmount(entityToVo.getFeeAmount()== null
+ ? BigDecimal.ZERO : entityToVo.getFeeAmount().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setMarkPrice(entityToVo.getMarkPrice()== null
+ ? BigDecimal.ZERO : entityToVo.getMarkPrice().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setEntrustCnt(entityToVo.getEntrustCnt()== null
+ ? BigDecimal.ZERO : entityToVo.getEntrustCnt().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setEntrustPrice(entityToVo.getEntrustPrice()== null
+ ? BigDecimal.ZERO : entityToVo.getEntrustPrice().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setDealCnt(entityToVo.getDealCnt()== null
+ ? BigDecimal.ZERO : entityToVo.getDealCnt().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setDealPrice(entityToVo.getDealPrice()== null
+ ? BigDecimal.ZERO : entityToVo.getDealPrice().setScale(4, BigDecimal.ROUND_DOWN));
+ entityToVo.setDealAmount(entityToVo.getDealAmount()== null
+ ? BigDecimal.ZERO : entityToVo.getDealAmount().setScale(4, BigDecimal.ROUND_DOWN));
arrayList.add(entityToVo);
}
}
--
Gitblit v1.9.1