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
4b4a5d6f
Commit
4b4a5d6f
authored
Apr 29, 2019
by
flying-cattle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作类,和生成类调整
parent
c681c7a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
controller.ftl
src/main/resources/freemarker/ftl/controller.ftl
+2
-2
TestMain.java
src/test/java/com/github/mybatis/fl/test/TestMain.java
+7
-3
No files found.
src/main/resources/freemarker/ftl/controller.ftl
View file @
4b4a5d6f
...
...
@@ -54,7 +54,7 @@ public class ${entityName}Controller {
*
@
author
${
author
}
*
@
time
${
createTime
}
*/
@
GetMapping
(
"/get
${entityName}
ById/{id}"
)
@
GetMapping
(
"/getById/{id}"
)
@
ApiOperation
(
value
=
"获取${entityComment}信息"
,
notes
=
"获取${entityComment}信息[${objectName}],作者:${author}"
)
@
ApiImplicitParam
(
paramType
=
"path"
,
name
=
"id"
,
value
=
"${entityComment}id"
,
required
=
true
,
dataType
=
"${idType}"
)
public
JsonResult
<${
entityName
}>
get
${
entityName
}
ById
(@
PathVariable
(
"id"
)${
idType
}
id
){
...
...
@@ -84,7 +84,7 @@ public class ${entityName}Controller {
*
@
author
${
author
}
*
@
time
${
createTime
}
*/
@
PostMapping
(
"/
insertSelectiv
e"
)
@
PostMapping
(
"/
saveOrUpdat
e"
)
@
ApiOperation
(
value
=
"添加${entityComment}"
,
notes
=
"添加${entityComment}[${objectName}],作者:${author}"
)
public
JsonResult
<${
entityName
}>
insertSelective
(${
entityName
}
${
objectName
}){
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>();
...
...
src/
main
/java/com/github/mybatis/fl/test/TestMain.java
→
src/
test
/java/com/github/mybatis/fl/test/TestMain.java
View file @
4b4a5d6f
...
...
@@ -12,7 +12,12 @@ import com.github.mybatis.fl.entity.BasisInfo;
import
com.github.mybatis.fl.util.EntityInfoUtil
;
import
com.github.mybatis.fl.util.Generator
;
import
com.github.mybatis.fl.util.MySqlToJavaUtil
;
/**
* Copyright: Copyright (c) 2019
*
* <p>说明: 自动生成工具</P>
* <p>源码地址:https://gitee.com/flying-cattle/mybatis-dsc-generator</P>
*/
public
class
TestMain
{
//基础信息
public
static
final
String
PROJECT
=
"user_center"
;
...
...
@@ -53,9 +58,8 @@ public class TestMain {
String
aa4
=
Generator
.
createService
(
fileUrl
,
bi
).
toString
();
String
aa5
=
Generator
.
createServiceImpl
(
fileUrl
,
bi
).
toString
();
String
aa6
=
Generator
.
createController
(
fileUrl
,
bi
).
toString
();
//
swagger配置文件还未上传至maven中央库,代码中已实现。
//
是否创建swagger配置文件
String
aa7
=
Generator
.
createSwaggerConfig
(
fileUrl
,
bi
).
toString
();
//创建swagger配置
System
.
out
.
println
(
aa1
);
System
.
out
.
println
(
aa2
);
...
...
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