From 602c28c45cfec4d800ca9bb9da969cbfa9094971 Mon Sep 17 00:00:00 2001
From: Hentua <wangdoubleone@gmail.com>
Date: Sun, 04 Jun 2023 12:30:44 +0800
Subject: [PATCH] fix

---
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsServiceImpl.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsServiceImpl.java
index 6135e77..875ed7c 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallGoodsServiceImpl.java
@@ -66,6 +66,9 @@
         objectQueryWrapper.eq("goods_id",id);
         Integer commentCount = mallGoodsCommentMapper.selectCount(objectQueryWrapper);
         mallGoodsDetailsVo.setCommentCount(commentCount);
+        int scorePercent = mallGoodsDetailsVo.getScorePercent() == null ? 0 : mallGoodsDetailsVo.getScorePercent();
+        mallGoodsDetailsVo.setScorePercentNum(new BigDecimal(scorePercent).multiply(new BigDecimal("0.01")));
+
         return mallGoodsDetailsVo;
     }
 

--
Gitblit v1.9.1