From 3d44e0b30a04e6a7ce14d6db968ec158f87df614 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 17 十月 2024 17:00:46 +0800 Subject: [PATCH] bug修改 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java index 60b1132..6c39482 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java @@ -190,7 +190,7 @@ siteDetailEvaluateVO.setOrderEvaluateVOS(tChargingOrders); // 统计好评率 long goodCount = tChargingOrders.stream().filter(orderEvaluateVO -> orderEvaluateVO.getMark()>=4).count(); - BigDecimal reviewRate = new BigDecimal(goodCount).divide(new BigDecimal(tChargingOrders.size())).setScale(2, BigDecimal.ROUND_HALF_UP); + BigDecimal reviewRate = new BigDecimal(goodCount).divide(new BigDecimal(tChargingOrders.size()),2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP); siteDetailEvaluateVO.setReviewRate(reviewRate); siteDetailEvaluateVO.setEvaluateCount(tChargingOrders.size()); siteDetailEvaluateVO.setOrderEvaluateVOS(tChargingOrders.stream().limit(3).collect(Collectors.toList())); -- Gitblit v1.7.1