yangyj 2 hónapja
szülő
commit
4fed93e41f

+ 1 - 1
blade-service/blade-manager/src/main/java/com/mixsmart/utils/StringUtils.java

@@ -1185,7 +1185,7 @@ public class StringUtils {
             }
             String val = new BigDecimal(handleNull(number)).setScale(handleObj2Integer(scale), BigDecimal.ROUND_HALF_UP).toString();
             if (val.contains(".")) {
-                return new BigDecimal(val).toString().replaceAll("(0+|\\.0+)$", "");
+                return new BigDecimal(val).stripTrailingZeros().toPlainString();
             }
             return val;
         }