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
JeeSpringCloudV3.0
Commits
cb1753ac
Commit
cb1753ac
authored
Oct 16, 2018
by
HuangBingGui
Browse files
no commit message
parent
3a5fb230
Changes
1
Hide whitespace changes
Inline
Side-by-side
JeeSpringCloud/src/main/java/com/jeespring/modules/gen/util/GenUtils.java
View file @
cb1753ac
...
...
@@ -51,7 +51,11 @@ public class GenUtils
column
.
setJavaType
(
"java.util.Date"
);
column
.
setShowType
(
"dateselect"
);
}
else
if
(
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"BIGINT"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"NUMBER"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"DECIMAL"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"INT"
))
if
(
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"BIGINT"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"NUMBER"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"DECIMAL"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"INT"
)
||
StringUtils
.
startsWithIgnoreCase
(
column
.
getJdbcType
(),
"TINYINT"
))
{
String
ss
[]
=
StringUtils
.
split
(
StringUtils
.
substringBetween
(
column
.
getJdbcType
(),
"("
,
")"
),
","
);
if
(
ss
!=
null
&&
ss
.
length
==
2
&&
Integer
.
parseInt
(
ss
[
1
])
>
0
)
...
...
@@ -62,6 +66,9 @@ public class GenUtils
else
column
.
setJavaType
(
"Long"
);
}
if
(
column
.
getJavaType
()==
null
||
""
.
equals
(
column
.
getJavaType
())){
column
.
setJavaType
(
"String"
);
}
column
.
setJavaField
(
StringUtils
.
toCamelCase
(
column
.
getName
()));
column
.
setIsPk
(
genTable
.
getPkList
().
contains
(
column
.
getName
())
?
"1"
:
"0"
);
if
(
column
.
getIsPk
()==
"1"
&&
column
.
getName
().
toLowerCase
().
contains
(
"id"
)){
...
...
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