Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl-generator
Overview
Overview
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
余保谷
ydl-generator
Commits
e35965c9
Commit
e35965c9
authored
Aug 10, 2018
by
bianpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
dfc57ca3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
controller.ftl
src/main/resources/freemarker/ftl/controller.ftl
+10
-10
No files found.
src/main/resources/freemarker/ftl/controller.ftl
View file @
e35965c9
...
@@ -56,8 +56,8 @@ public class ${entityName}Controller {
...
@@ -56,8 +56,8 @@ public class ${entityName}Controller {
@
GetMapping
(
"/get${entityName}ById/{id}"
)
@
GetMapping
(
"/get${entityName}ById/{id}"
)
@
ApiOperation
(
value
=
"获取${entityComment}信息"
,
notes
=
"获取${entityComment}信息[${objectName}],作者:${author}"
)
@
ApiOperation
(
value
=
"获取${entityComment}信息"
,
notes
=
"获取${entityComment}信息[${objectName}],作者:${author}"
)
@
ApiImplicitParam
(
paramType
=
"path"
,
name
=
"id"
,
value
=
"${entityComment}id"
,
required
=
true
,
dataType
=
"Long"
)
@
ApiImplicitParam
(
paramType
=
"path"
,
name
=
"id"
,
value
=
"${entityComment}id"
,
required
=
true
,
dataType
=
"Long"
)
public
JsonResult
get
${
entityName
}
ById
(@
PathVariable
(
"id"
)
Long
id
){
public
JsonResult
<${
entityName
}>
get
${
entityName
}
ById
(@
PathVariable
(
"id"
)
Long
id
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>
();
try
{
try
{
${
entityName
}
${
objectName
}=${
objectName
}
ServiceImpl
.
selectByPrimaryKey
(
id
);
${
entityName
}
${
objectName
}=${
objectName
}
ServiceImpl
.
selectByPrimaryKey
(
id
);
if
(${
objectName
}
!=null) {
if
(${
objectName
}
!=null) {
...
@@ -86,8 +86,8 @@ public class ${entityName}Controller {
...
@@ -86,8 +86,8 @@ public class ${entityName}Controller {
*/
*/
@
PostMapping
(
"/insertSelective"
)
@
PostMapping
(
"/insertSelective"
)
@
ApiOperation
(
value
=
"添加${entityComment}"
,
notes
=
"添加${entityComment}[${objectName}],作者:${author}"
)
@
ApiOperation
(
value
=
"添加${entityComment}"
,
notes
=
"添加${entityComment}[${objectName}],作者:${author}"
)
public
JsonResult
insertSelective
(${
entityName
}
${
objectName
}){
public
JsonResult
<${
entityName
}>
insertSelective
(${
entityName
}
${
objectName
}){
JsonResult
result
=
new
JsonResult
();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>
();
try
{
try
{
int
rg
=${
objectName
}
ServiceImpl
.
insertSelective
(${
objectName
});
int
rg
=${
objectName
}
ServiceImpl
.
insertSelective
(${
objectName
});
if
(
rg
>
0
)
{
if
(
rg
>
0
)
{
...
@@ -147,8 +147,8 @@ public class ${entityName}Controller {
...
@@ -147,8 +147,8 @@ public class ${entityName}Controller {
*/
*/
@
ApiOperation
(
value
=
"修改${entityComment}"
,
notes
=
"修改${entityComment}[${objectName}],作者:${author}"
)
@
ApiOperation
(
value
=
"修改${entityComment}"
,
notes
=
"修改${entityComment}[${objectName}],作者:${author}"
)
@
PostMapping
(
"/updateByPrimaryKeySelective"
)
@
PostMapping
(
"/updateByPrimaryKeySelective"
)
public
JsonResult
updateByPrimaryKeySelective
(${
entityName
}
${
objectName
}){
public
JsonResult
<${
entityName
}>
updateByPrimaryKeySelective
(${
entityName
}
${
objectName
}){
JsonResult
result
=
new
JsonResult
();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>
();
try
{
try
{
int
reg
=
${
objectName
}
ServiceImpl
.
updateByPrimaryKeySelective
(${
objectName
});
int
reg
=
${
objectName
}
ServiceImpl
.
updateByPrimaryKeySelective
(${
objectName
});
if
(
reg
>
0
)
{
if
(
reg
>
0
)
{
...
@@ -177,8 +177,8 @@ public class ${entityName}Controller {
...
@@ -177,8 +177,8 @@ public class ${entityName}Controller {
*/
*/
@
ApiOperation
(
value
=
"条件查询${entityComment}"
,
notes
=
"条件查询[${objectName}],作者:${author}"
)
@
ApiOperation
(
value
=
"条件查询${entityComment}"
,
notes
=
"条件查询[${objectName}],作者:${author}"
)
@
PostMapping
(
"/query${entityName}List"
)
@
PostMapping
(
"/query${entityName}List"
)
public
JsonResult
query
${
entityName
}
List
(${
entityName
}
${
objectName
}){
public
JsonResult
<${
entityName
}>
query
${
entityName
}
List
(${
entityName
}
${
objectName
}){
JsonResult
result
=
new
JsonResult
();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>
();
try
{
try
{
List
<${
entityName
}>
list
=
${
objectName
}
ServiceImpl
.
query
${
entityName
}
List
(${
objectName
});
List
<${
entityName
}>
list
=
${
objectName
}
ServiceImpl
.
query
${
entityName
}
List
(${
objectName
});
result
.
setCode
(
1
);
result
.
setCode
(
1
);
...
@@ -205,8 +205,8 @@ public class ${entityName}Controller {
...
@@ -205,8 +205,8 @@ public class ${entityName}Controller {
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageNum"
,
value
=
"当前页"
,
required
=
true
,
dataType
=
"int"
),
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageNum"
,
value
=
"当前页"
,
required
=
true
,
dataType
=
"int"
),
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageSize"
,
value
=
"页行数"
,
required
=
true
,
dataType
=
"int"
)
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageSize"
,
value
=
"页行数"
,
required
=
true
,
dataType
=
"int"
)
})
})
public
JsonResult
get
${
entityName
}
BySearch
(
Integer
pageNum
,
Integer
pageSize
){
public
JsonResult
<${
entityName
}>
get
${
entityName
}
BySearch
(
Integer
pageNum
,
Integer
pageSize
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>
();
AppPage
<${
entityName
}>
page
=
new
AppPage
<${
entityName
}>();
AppPage
<${
entityName
}>
page
=
new
AppPage
<${
entityName
}>();
page
.
setPageNum
(
pageNum
);
page
.
setPageNum
(
pageNum
);
page
.
setPageSize
(
pageSize
);
page
.
setPageSize
(
pageSize
);
...
...
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