Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
b778c6a5
Commit
b778c6a5
authored
Jul 15, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成器调整
parent
d5d7143e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Entity.java.vm
...l/yifu-codegen/src/main/resources/template/Entity.java.vm
+3
-3
No files found.
yifu-visual/yifu-codegen/src/main/resources/template/Entity.java.vm
View file @
b778c6a5
...
@@ -53,12 +53,12 @@ public class ${className} extends BaseEntity {
...
@@ -53,12 +53,12 @@ public class ${className} extends BaseEntity {
#
if
($
column
.
columnName
==
$
pk
.
columnName
)
#
if
($
column
.
columnName
==
$
pk
.
columnName
)
@
TableId
(
type
=
IdType
.
ASSIGN_ID
)
@
TableId
(
type
=
IdType
.
ASSIGN_ID
)
#
else
#
else
@
ExcelAttribute
(
name
=
"$column.comments"
#
if
($
column
.
nullable
),
isNotEmpty
=
true
,
errorInfo
=
"$column.comments
不能为空"
#
end
#
if
($
column
.
attrType
==
'LocalDate'
||
$
column
.
attrType
==
'LocalDateTime'
)
,
isDate
=
true
#
end
#
if
($
column
.
maxLength
),
maxLength
=
$
column
.
maxLength
#
end
)
@
ExcelAttribute
(
name
=
"$column.comments"
#
if
($
column
.
nullable
),
isNotEmpty
=
true
,
errorInfo
=
"$column.comments不能为空"
#
end
#
if
($
column
.
attrType
==
'LocalDate'
||
$
column
.
attrType
==
'LocalDateTime'
)
,
isDate
=
true
#
end
#
if
($
column
.
maxLength
),
maxLength
=
$
column
.
maxLength
#
end
)
#
if
($
column
.
nullable
)
#
if
($
column
.
nullable
)
@
NotBlank
(
message
=
"$column.comments
不能为空"
)
@
NotBlank
(
message
=
"$column.comments不能为空"
)
#
end
#
end
#
if
($
column
.
maxLength
&&
$
column
.
attrType
==
'String'
)
#
if
($
column
.
maxLength
&&
$
column
.
attrType
==
'String'
)
@
Length
(
max
=$
column
.
maxLength
,
message
=
"$column.comments
不能超过$column.maxLength
个字符"
)
@
Length
(
max
=$
column
.
maxLength
,
message
=
"$column.comments
不能超过$column.maxLength
个字符"
)
#
end
#
end
#
end
#
end
#
end
#
end
...
...
Write
Preview
Markdown
is supported
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