hanfucheng il y a 1 an
Parent
commit
f6d7e57f5e

+ 2 - 2
src/main/java/com/sooka/sponest/data/index/service/impl/IndexViewServiceImpl.java

@@ -349,7 +349,7 @@ public class IndexViewServiceImpl extends BaseServiceImpl implements IndexViewSe
             td.put("name",m.getKey());
             td.put("count",count);
             td.put("updateCount",updateCount);
-            BigDecimal updateRate = new BigDecimal(0);
+            BigDecimal updateRate = new BigDecimal(0).setScale(2,RoundingMode.HALF_UP);
             if (updateCount!=0) {
                 BigDecimal counts = new BigDecimal(count);
                 BigDecimal updateCounts = new BigDecimal(updateCount);
@@ -365,7 +365,7 @@ public class IndexViewServiceImpl extends BaseServiceImpl implements IndexViewSe
                 map1.put("name",indexViewInfo.getCategory());
                 map1.put("count",indexViewInfo.getCount());
                 map1.put("updateCount",indexViewInfo.getUpdataCount());
-                BigDecimal updateRate = new BigDecimal(0);
+                BigDecimal updateRate = new BigDecimal(0).setScale(2,RoundingMode.HALF_UP);
                 if (indexViewInfo.getUpdataCount()!=0){
                     BigDecimal counts = new BigDecimal(indexViewInfo.getCount());
                     BigDecimal updateCounts = new BigDecimal(indexViewInfo.getUpdataCount());