Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
526c3867
Commit
526c3867
authored
Apr 21, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码生成Date字段添加默认格式
parent
d452ddf5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
...n/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
+1
-0
ruoyi/src/main/resources/vm/java/domain.java.vm
ruoyi/src/main/resources/vm/java/domain.java.vm
+4
-3
ruoyi/src/main/resources/vm/vue/index-tree.vue.vm
ruoyi/src/main/resources/vm/vue/index-tree.vue.vm
+1
-1
ruoyi/src/main/resources/vm/vue/index.vue.vm
ruoyi/src/main/resources/vm/vue/index.vue.vm
+1
-1
No files found.
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
View file @
526c3867
...
@@ -196,6 +196,7 @@ public class VelocityUtils
...
@@ -196,6 +196,7 @@ public class VelocityUtils
if
(!
column
.
isSuperColumn
()
&&
GenConstants
.
TYPE_DATE
.
equals
(
column
.
getJavaType
()))
if
(!
column
.
isSuperColumn
()
&&
GenConstants
.
TYPE_DATE
.
equals
(
column
.
getJavaType
()))
{
{
importList
.
add
(
"java.util.Date"
);
importList
.
add
(
"java.util.Date"
);
importList
.
add
(
"com.fasterxml.jackson.annotation.JsonFormat"
);
}
}
else
if
(!
column
.
isSuperColumn
()
&&
GenConstants
.
TYPE_BIGDECIMAL
.
equals
(
column
.
getJavaType
()))
else
if
(!
column
.
isSuperColumn
()
&&
GenConstants
.
TYPE_BIGDECIMAL
.
equals
(
column
.
getJavaType
()))
{
{
...
...
ruoyi/src/main/resources/vm/java/domain.java.vm
View file @
526c3867
package
${
packageName
}.
domain
;
package
${
packageName
}.
domain
;
#
foreach
($
import
in
$
importList
)
import
${
import
};
#
end
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringBuilder
;
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringBuilder
;
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringStyle
;
import
org
.
apache
.
commons
.
lang3
.
builder
.
ToStringStyle
;
import
com
.
ruoyi
.
framework
.
aspectj
.
lang
.
annotation
.
Excel
;
import
com
.
ruoyi
.
framework
.
aspectj
.
lang
.
annotation
.
Excel
;
...
@@ -8,9 +11,6 @@ import com.ruoyi.framework.web.domain.BaseEntity;
...
@@ -8,9 +11,6 @@ import com.ruoyi.framework.web.domain.BaseEntity;
#
elseif
($
table
.
tree
)
#
elseif
($
table
.
tree
)
import
com
.
ruoyi
.
framework
.
web
.
domain
.
TreeEntity
;
import
com
.
ruoyi
.
framework
.
web
.
domain
.
TreeEntity
;
#
end
#
end
#
foreach
($
import
in
$
importList
)
import
${
import
};
#
end
/**
/**
*
${
functionName
}
对象
${
tableName
}
*
${
functionName
}
对象
${
tableName
}
...
@@ -40,6 +40,7 @@ public class ${ClassName} extends ${Entity}
...
@@ -40,6 +40,7 @@ public class ${ClassName} extends ${Entity}
#
if
($
parentheseIndex
!= -1)
#
if
($
parentheseIndex
!= -1)
@
Excel
(
name
=
"${comment}"
,
readConverterExp
=
"$column.readConverterExp()"
)
@
Excel
(
name
=
"${comment}"
,
readConverterExp
=
"$column.readConverterExp()"
)
#
elseif
($
column
.
javaType
==
'Date'
)
#
elseif
($
column
.
javaType
==
'Date'
)
@
JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@
Excel
(
name
=
"${comment}"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
@
Excel
(
name
=
"${comment}"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
#
else
#
else
@
Excel
(
name
=
"${comment}"
)
@
Excel
(
name
=
"${comment}"
)
...
...
ruoyi/src/main/resources/vm/vue/index-tree.vue.vm
View file @
526c3867
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
#elseif($column.list && $column.htmlType == "datetime")
#elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.${javaField}) }}</span>
<span>{{ parseTime(scope.row.${javaField})
, '{y}-{m}-{d}')
}}</span>
</template>
</template>
</el-table-column>
</el-table-column>
#elseif($column.list && "" != $column.dictType)
#elseif($column.list && "" != $column.dictType)
...
...
ruoyi/src/main/resources/vm/vue/index.vue.vm
View file @
526c3867
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
#elseif($column.list && $column.htmlType == "datetime")
#elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.${javaField}) }}</span>
<span>{{ parseTime(scope.row.${javaField}
, '{y}-{m}-{d}'
) }}</span>
</template>
</template>
</el-table-column>
</el-table-column>
#elseif($column.list && "" != $column.dictType)
#elseif($column.list && "" != $column.dictType)
...
...
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