From 33f09d7747df2d45736999e8e6a367a98840e3bc Mon Sep 17 00:00:00 2001
From: Live <1005297262@qq.com>
Date: 星期二, 09 六月 2020 11:33:09 +0800
Subject: [PATCH] 生成domain 如果是浮点型 统一用BigDecimal
---
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java | 4 ++--
1 files 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 047cd2d..29a840d 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 @@
{
column.setHtmlType(GenConstants.HTML_INPUT);
- // 濡傛灉鏄诞鐐瑰瀷
+ // 濡傛灉鏄诞鐐瑰瀷 缁熶竴鐢˙igDecimal
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)
--
Gitblit v1.9.3