From 33f09d7747df2d45736999e8e6a367a98840e3bc Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:33:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90domain=20=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E6=B5=AE=E7=82=B9=E5=9E=8B=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=94=A8BigDecimal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/project/tool/gen/util/GenUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java index 047cd2d5a..29a840dd6 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java @@ -58,11 +58,11 @@ public class GenUtils { column.setHtmlType(GenConstants.HTML_INPUT); - // 如果是浮点型 + // 如果是浮点型 统一用BigDecimal String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) { - column.setJavaType(GenConstants.TYPE_DOUBLE); + column.setJavaType(GenConstants.TYPE_BIGDECIMAL); } // 如果是整形 else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)