diff --git a/src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java b/src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java index d576cc2c337fbefd734aadeaee59ebe7bb099d8d..fd944e9d735ffc17d005e329557de8260ec12309 100644 --- a/src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java +++ b/src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java @@ -161,9 +161,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan BonusRatioVO vo = new BonusRatioVO(); vo.setType(l.getDistributeType()); vo.setTime(l.getDistributeDate().getTime()); - if (l.getDistribution() != null) { - vo.setDistribution(l.getDistribution().setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - } + vo.setDistribution(BigDecimalUtil.toString(l.getDistribution(), 2)); return vo; }).collect(Collectors.toList()); } diff --git a/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java b/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java index 496964302cf816e8a9746b8c737103d366c2d707..91bb5de2c71e63bb6e054f82696e3c57fd7fb580 100644 --- a/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java +++ b/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java @@ -533,9 +533,7 @@ public class ProductServiceImpl implements ProductService, Constant { BonusRatioVO vo = new BonusRatioVO(); vo.setType(l.getDistributeType()); vo.setTime(l.getDistributeDate().getTime()); - if (l.getDistribution() != null) { - vo.setDistribution(l.getDistribution().setScale(2, BigDecimal.ROUND_HALF_UP).toString()); - } + vo.setDistribution(BigDecimalUtil.toString(l.getDistribution(), 2)); return vo; }).collect(Collectors.toList()); }