Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
33f09d77
Commit
33f09d77
authored
Jun 09, 2020
by
Live
Committed by
Gitee
Jun 09, 2020
Browse files
生成domain 如果是浮点型 统一用BigDecimal
parent
7afc5acc
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java
View file @
33f09d77
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment