diff --git a/pom.xml b/pom.xml index 74dc24b..562b848 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.tsl3060.open.extend tsl-open-sdk-java-wanshun - 0.3.8 + 0.3.9 8 diff --git a/src/main/java/com/tsl3060/open/extend/core/secure/RSASecure.java b/src/main/java/com/tsl3060/open/extend/core/secure/RSASecure.java index 8a4365e..88065ff 100644 --- a/src/main/java/com/tsl3060/open/extend/core/secure/RSASecure.java +++ b/src/main/java/com/tsl3060/open/extend/core/secure/RSASecure.java @@ -48,13 +48,13 @@ public class RSASecure implements ISecure { Object v = j.get(key); String vx; if (v instanceof Double) { - vx = String.format("%.2f", v); + vx = String.format("%s", BigDecimal.valueOf((Double) v).stripTrailingZeros()); } else if (v instanceof Float) { - vx = String.format("%.2f", v); + vx = String.format("%s", BigDecimal.valueOf((Float) v).stripTrailingZeros()); } else if (v instanceof Boolean) { vx = String.format("%s", v); } else if (v instanceof BigDecimal) { - vx = String.format("%.2f", v); + vx = String.format("%s", ((BigDecimal) v).stripTrailingZeros()); } else { vx = String.valueOf(v); }