Live
2020-06-09 33f09d7747df2d45736999e8e6a367a98840e3bc
生成domain 如果是浮点型 统一用BigDecimal
已修改1个文件
4 ■■■■ 文件已修改
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java
@@ -58,11 +58,11 @@
        {
            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)