mirror of https://gitee.com/y_project/RuoYi.git
代码生成浮点型改用BigDecimal
parent
fedb39c9ad
commit
338138a0bc
|
@ -62,7 +62,7 @@ public class GenUtils
|
||||||
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
|
String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
|
||||||
if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0)
|
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)
|
else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10)
|
||||||
|
|
Loading…
Reference in New Issue