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
40b90936
Commit
40b90936
authored
Feb 20, 2020
by
bianpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改目录结构
parent
4a417b98
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
71 additions
and
59 deletions
+71
-59
README.md
README.md
+6
-6
pom.xml
pom.xml
+17
-5
Const.java
src/main/java/com/gitee/flying/cattle/mdg/aid/Const.java
+2
-2
JsonResult.java
src/main/java/com/gitee/flying/cattle/mdg/aid/JsonResult.java
+2
-2
PageParam.java
src/main/java/com/gitee/flying/cattle/mdg/aid/PageParam.java
+2
-2
DateType.java
src/main/java/com/gitee/flying/cattle/mdg/convert/DateType.java
+2
-2
DbColumnType.java
src/main/java/com/gitee/flying/cattle/mdg/convert/DbColumnType.java
+2
-2
IColumnType.java
src/main/java/com/gitee/flying/cattle/mdg/convert/IColumnType.java
+2
-2
ITypeConvert.java
src/main/java/com/gitee/flying/cattle/mdg/convert/ITypeConvert.java
+2
-2
MySqlTypeConvert.java
src/main/java/com/gitee/flying/cattle/mdg/convert/MySqlTypeConvert.java
+3
-3
BasisInfo.java
src/main/java/com/gitee/flying/cattle/mdg/entity/BasisInfo.java
+2
-2
GeneratorFileUrl.java
src/main/java/com/gitee/flying/cattle/mdg/entity/GeneratorFileUrl.java
+2
-2
PropertyInfo.java
src/main/java/com/gitee/flying/cattle/mdg/entity/PropertyInfo.java
+2
-2
ResultJson.java
src/main/java/com/gitee/flying/cattle/mdg/entity/ResultJson.java
+2
-2
EntityInfoUtil.java
src/main/java/com/gitee/flying/cattle/mdg/util/EntityInfoUtil.java
+4
-4
FreemarkerUtil.java
src/main/java/com/gitee/flying/cattle/mdg/util/FreemarkerUtil.java
+4
-4
Generator.java
src/main/java/com/gitee/flying/cattle/mdg/util/Generator.java
+5
-5
MySqlToJavaUtil.java
src/main/java/com/gitee/flying/cattle/mdg/util/MySqlToJavaUtil.java
+4
-4
AbstractController.ftl
src/main/resources/freemarker/ftl/AbstractController.ftl
+2
-2
MyGenerator.java
src/test/java/com/flying/cattle/mdg/MyGenerator.java
+4
-4
No files found.
README.md
View file @
40b90936
...
...
@@ -3,8 +3,8 @@
</p>
<p
align=
"center"
>
<a
target=
"_blank"
href=
"https://search.maven.org/search?q=com.git
hub
.flying-cattle"
>
<img
alt=
"Maven Central"
src=
"https://img.shields.io/maven-central/v/com.git
hub
.flying-cattle/mybatis-dsc-generator.svg"
>
<a
target=
"_blank"
href=
"https://search.maven.org/search?q=com.git
ee
.flying-cattle"
>
<img
alt=
"Maven Central"
src=
"https://img.shields.io/maven-central/v/com.git
ee
.flying-cattle/mybatis-dsc-generator.svg"
>
</a>
<a
target=
"_blank"
href=
"https://www.apache.org/licenses/LICENSE-2.0.html"
>
<img
src=
"https://img.shields.io/badge/License-Apache%202.0-blue.svg"
></img>
...
...
@@ -17,14 +17,14 @@
# mybatis-dsc-generator
完美集成lombok,swagger的代码生成工具,让你不再为繁琐的注释和简单的接口实现而烦恼:entity集成,格式校验,swagger; dao自动加@ mapper,service自动注释和依赖; 控制器实现单表的增副改查,并集成swagger实现api文档。如果有缘看见,期望得到你的star,very thx.
# 源码地址
-
GitHub:https://github
.com/flying-cattle/mybatis-dsc-generator
-
gitee:https://gitee
.com/flying-cattle/mybatis-dsc-generator
-
码云:https://gitee.com/flying-cattle/mybatis-dsc-generator
# MAVEN地址
2.
1.0版本是未集成Mybatis-plus版本——源码分支master
```
xml
<dependency>
<groupId>
com.git
hub
.flying-cattle
</groupId>
<groupId>
com.git
ee
.flying-cattle
</groupId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<version>
2.1.0.RELEASE
</version>
</dependency>
...
...
@@ -32,7 +32,7 @@
3.
0.0后的版本是集成了Mybatis-plus版本——源码分支mybatisPlus
```
xml
<dependency>
<groupId>
com.git
hub
.flying-cattle
</groupId>
<groupId>
com.git
ee
.flying-cattle
</groupId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<version>
3.0.6.RELEASE
</version>
</dependency>
...
...
@@ -59,7 +59,7 @@ CREATE TABLE `user` (
要求必须有表注释,要求必须有主键为id,所有字段必须有注释(便于生成java注释swagger等)。
# 生成的实体类
生成方法参考源码中的:https://git
hub
.com/flying-cattle/mybatis-dsc-generator/blob/mybatisPlus/src/test/java/com/flying/cattle/mdg/MyGenerator.java
生成方法参考源码中的:https://git
ee
.com/flying-cattle/mybatis-dsc-generator/blob/mybatisPlus/src/test/java/com/flying/cattle/mdg/MyGenerator.java
# 生成的实体类
```
java
...
...
pom.xml
View file @
40b90936
...
...
@@ -4,14 +4,14 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.git
hub
.flying-cattle
</groupId>
<groupId>
com.git
ee
.flying-cattle
</groupId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<version>
3.0.7.RELEASE
</version>
<packaging>
jar
</packaging>
<name>
mybatis-dsc-generator
</name>
<description>
According to the database, three layers of code are generated automatically.
</description>
<url>
https://git
hub
.com/flying-cattle/mybatis-dsc-generator
</url>
<url>
https://git
ee
.com/flying-cattle/mybatis-dsc-generator
</url>
<!-- 证书 -->
<licenses>
<license>
...
...
@@ -27,9 +27,10 @@
</developer>
</developers>
<scm>
<connection>
scm:git:git@github.com:flying-cattle/mybatis-dsc-generator.git
</connection>
<developerConnection>
scm:git:git@github.com:flying-cattle/mybatis-dsc-generator.git
</developerConnection>
<url>
git@github.com:flying-cattle/mybatis-dsc-generator.git
</url>
<connection>
scm:git:git@gitee.com:flying-cattle/mybatis-dsc-generator.git
</connection>
<developerConnection>
scm:git:git@gitee.com:flying-cattle/mybatis-dsc-generator.git
</developerConnection>
<url>
git@gitee.com:flying-cattle/mybatis-dsc-generator.git
</url>
<tag>
HEAD
</tag>
</scm>
<properties>
...
...
@@ -148,6 +149,17 @@
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-release-plugin
</artifactId>
<configuration>
<tagNameFormat>
v@{project.version}
</tagNameFormat>
<autoVersionSubmodules>
true
</autoVersionSubmodules>
<indentSize>
4
</indentSize>
<useEditMode>
true
</useEditMode>
<localCheckout>
true
</localCheckout>
</configuration>
</plugin>
</plugins>
</build>
</project>
src/main/java/com/git
hub
/flying/cattle/mdg/aid/Const.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/aid/Const.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.flying.cattle.mdg.aid
* @Package: com.git
ee.flying.cattle.mdg.aid
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
aid
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
aid
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/aid/JsonResult.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/aid/JsonResult.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.flying.cattle.mdg.aid
* @Package: com.git
ee.flying.cattle.mdg.aid
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
aid
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
aid
;
import
java.io.Serializable
;
import
java.net.ConnectException
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/aid/PageParam.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/aid/PageParam.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.flying.cattle.mdg.aid
* @Package: com.git
ee.flying.cattle.mdg.aid
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
aid
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
aid
;
import
java.io.Serializable
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/convert/DateType.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/convert/DateType.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
convert
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
convert
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/convert/DbColumnType.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/convert/DbColumnType.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
*
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
convert
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
convert
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/convert/IColumnType.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/convert/IColumnType.java
View file @
40b90936
...
...
@@ -3,11 +3,11 @@
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:09:35
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
convert
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
convert
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/convert/ITypeConvert.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/convert/ITypeConvert.java
View file @
40b90936
...
...
@@ -3,11 +3,11 @@
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:06:16
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
convert
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
convert
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/convert/MySqlTypeConvert.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/convert/MySqlTypeConvert.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
*
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:13:13
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
convert
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
convert
;
import
com.git
hub.flying.cattle.mdg.convert.ITypeConvert
;
import
com.git
ee.flying.cattle.mdg.convert.ITypeConvert
;
/**
* Copyright: Copyright (c) 2019
*
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/entity/BasisInfo.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/entity/BasisInfo.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.entity
* @Package: com.git
ee.mybatis.fl.entity
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
entity
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
entity
;
import
java.io.Serializable
;
import
java.util.HashSet
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/entity/GeneratorFileUrl.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/entity/GeneratorFileUrl.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.entity
* @Package: com.git
ee.mybatis.fl.entity
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
entity
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
entity
;
import
java.io.Serializable
;
import
lombok.AllArgsConstructor
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/entity/PropertyInfo.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/entity/PropertyInfo.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.entity
* @Package: com.git
ee.mybatis.fl.entity
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
entity
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
entity
;
import
java.io.Serializable
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/entity/ResultJson.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/entity/ResultJson.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.entity
* @Package: com.git
ee.mybatis.fl.entity
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
entity
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
entity
;
import
java.io.Serializable
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/util/EntityInfoUtil.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/util/EntityInfoUtil.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.util
* @Package: com.git
ee.mybatis.fl.util
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
util
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
util
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
...
...
@@ -15,8 +15,8 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Set
;
import
com.git
hub.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
hub.flying.cattle.mdg.entity.PropertyInfo
;
import
com.git
ee.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
ee.flying.cattle.mdg.entity.PropertyInfo
;
/**
* Copyright: Copyright (c) 2019
*
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/util/FreemarkerUtil.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/util/FreemarkerUtil.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
util
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
util
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
com.git
hub.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
hub.flying.cattle.mdg.entity.ResultJson
;
import
com.git
ee.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
ee.flying.cattle.mdg.entity.ResultJson
;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/util/Generator.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/util/Generator.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.convert
* @Package: com.git
ee.mybatis.fl.convert
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
util
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
util
;
import
java.util.List
;
import
com.git
hub.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
hub.flying.cattle.mdg.entity.ResultJson
;
import
com.git
hub.flying.cattle.mdg.entity.PropertyInfo
;
import
com.git
ee.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
ee.flying.cattle.mdg.entity.ResultJson
;
import
com.git
ee.flying.cattle.mdg.entity.PropertyInfo
;
/**
* Copyright: Copyright (c) 2019
...
...
src/main/java/com/git
hub
/flying/cattle/mdg/util/MySqlToJavaUtil.java
→
src/main/java/com/git
ee
/flying/cattle/mdg/util/MySqlToJavaUtil.java
View file @
40b90936
/**
* Copyright © 2019 dream horse Info. Tech Ltd. All rights reserved.
* @Package: com.git
hub.mybatis.fl.util
* @Package: com.git
ee.mybatis.fl.util
* @author: flying-cattle
* @date: 2019年4月9日 下午8:15:25
*/
package
com
.
git
hub
.
flying
.
cattle
.
mdg
.
util
;
package
com
.
git
ee
.
flying
.
cattle
.
mdg
.
util
;
import
com.git
hub.flying.cattle.mdg.convert.DateType
;
import
com.git
hub.flying.cattle.mdg.convert.MySqlTypeConvert
;
import
com.git
ee.flying.cattle.mdg.convert.DateType
;
import
com.git
ee.flying.cattle.mdg.convert.MySqlTypeConvert
;
/**
* Copyright: Copyright (c) 2019
*
...
...
src/main/resources/freemarker/ftl/AbstractController.ftl
View file @
40b90936
...
...
@@ -14,8 +14,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com
.
baomidou
.
mybatisplus
.
core
.
metadata
.
IPage
;
import
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
;
import
com
.
baomidou
.
mybatisplus
.
extension
.
service
.
IService
;
import
com
.
git
hub
.
flying
.
cattle
.
mdg
.
aid
.
JsonResult
;
import
com
.
git
hub
.
flying
.
cattle
.
mdg
.
aid
.
PageParam
;
import
com
.
git
ee
.
flying
.
cattle
.
mdg
.
aid
.
JsonResult
;
import
com
.
git
ee
.
flying
.
cattle
.
mdg
.
aid
.
PageParam
;
<#
if
isSwagger
==
"true"
>
import
io
.
swagger
.
annotations
.
ApiImplicitParam
;
import
io
.
swagger
.
annotations
.
ApiOperation
;
...
...
src/test/java/com/flying/cattle/mdg/MyGenerator.java
View file @
40b90936
...
...
@@ -9,10 +9,10 @@ package com.flying.cattle.mdg;
import
java.sql.SQLException
;
import
java.util.Date
;
import
com.git
hub
.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
hub
.flying.cattle.mdg.util.EntityInfoUtil
;
import
com.git
hub
.flying.cattle.mdg.util.Generator
;
import
com.git
hub
.flying.cattle.mdg.util.MySqlToJavaUtil
;
import
com.git
ee
.flying.cattle.mdg.entity.BasisInfo
;
import
com.git
ee
.flying.cattle.mdg.util.EntityInfoUtil
;
import
com.git
ee
.flying.cattle.mdg.util.Generator
;
import
com.git
ee
.flying.cattle.mdg.util.MySqlToJavaUtil
;
/**
* Copyright: Copyright (c) 2019
*
...
...
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