提交者
Gitee
生成domain 如果是浮点型 统一用BigDecimal
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -58,11 +58,11 @@ public class GenUtils | @@ -58,11 +58,11 @@ public class GenUtils | ||
| 58 | { | 58 | { |
| 59 | column.setHtmlType(GenConstants.HTML_INPUT); | 59 | column.setHtmlType(GenConstants.HTML_INPUT); |
| 60 | 60 | ||
| 61 | - // 如果是浮点型 | 61 | + // 如果是浮点型 统一用BigDecimal |
| 62 | String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); | 62 | String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); |
| 63 | if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) | 63 | if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) |
| 64 | { | 64 | { |
| 65 | - column.setJavaType(GenConstants.TYPE_DOUBLE); | 65 | + column.setJavaType(GenConstants.TYPE_BIGDECIMAL); |
| 66 | } | 66 | } |
| 67 | // 如果是整形 | 67 | // 如果是整形 |
| 68 | else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) | 68 | else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) |
-
请 注册 或 登录 后发表评论