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
0e69ee74
Commit
0e69ee74
authored
Aug 10, 2018
by
bianpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0.0
parent
434266a5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
46 deletions
+58
-46
pom.xml
pom.xml
+2
-2
BasisInfo.java
src/main/java/com/github/mybatis/entity/BasisInfo.java
+4
-0
TestMain.java
src/main/java/com/github/mybatis/test/TestMain.java
+21
-21
EntityInfoUtil.java
src/main/java/com/github/mybatis/util/EntityInfoUtil.java
+9
-1
controller.ftl
src/main/resources/freemarker/ftl/controller.ftl
+9
-9
dao.ftl
src/main/resources/freemarker/ftl/dao.ftl
+2
-2
mapper.ftl
src/main/resources/freemarker/ftl/mapper.ftl
+7
-7
service.ftl
src/main/resources/freemarker/ftl/service.ftl
+2
-2
serviceImpl.ftl
src/main/resources/freemarker/ftl/serviceImpl.ftl
+2
-2
No files found.
pom.xml
View file @
0e69ee74
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
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>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.github
</groupId>
<groupId>
com.github
.flying-cattle
</groupId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<version>
1.1.6
.RELEASE
</version>
<version>
2.0.0
.RELEASE
</version>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<name>
mybatis-dsc-generator
</name>
<name>
mybatis-dsc-generator
</name>
...
...
src/main/java/com/github/mybatis/entity/BasisInfo.java
View file @
0e69ee74
...
@@ -51,6 +51,10 @@ public class BasisInfo implements Serializable{
...
@@ -51,6 +51,10 @@ public class BasisInfo implements Serializable{
private
String
controllerUrl
;
private
String
controllerUrl
;
private
String
idType
;
private
String
idJdbcType
;
private
List
<
PropertyInfo
>
cis
;
private
List
<
PropertyInfo
>
cis
;
public
BasisInfo
(
String
project
,
String
author
,
String
version
,
String
dbUrl
,
String
dbName
,
String
dbPassword
,
public
BasisInfo
(
String
project
,
String
author
,
String
version
,
String
dbUrl
,
String
dbName
,
String
dbPassword
,
...
...
src/main/java/com/github/mybatis/test/TestMain.java
View file @
0e69ee74
...
@@ -10,27 +10,27 @@ import com.github.mybatis.util.MySqlToJavaUtil;
...
@@ -10,27 +10,27 @@ import com.github.mybatis.util.MySqlToJavaUtil;
public
class
TestMain
{
public
class
TestMain
{
//基础信息
//基础信息
public
static
final
String
PROJECT
=
"
deal-center
"
;
public
static
final
String
PROJECT
=
"
qixingbao-show
"
;
public
static
final
String
AUTHOR
=
"BianP"
;
public
static
final
String
AUTHOR
=
"BianP"
;
public
static
final
String
VERSION
=
"V1.0"
;
public
static
final
String
VERSION
=
"V1.0"
;
//数据库连接信息
//数据库连接信息
public
static
final
String
URL
=
"jdbc:mysql://127.0.0.1:3306/
xin
?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&useSSL=true"
;
public
static
final
String
URL
=
"jdbc:mysql://127.0.0.1:3306/
qixingbao
?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false&useSSL=true"
;
public
static
final
String
NAME
=
"root"
;
public
static
final
String
NAME
=
"root"
;
public
static
final
String
PASSWORD
=
"123456"
;
public
static
final
String
PASSWORD
=
"123456"
;
public
static
final
String
DATABASE
=
"
xin
"
;
public
static
final
String
DATABASE
=
"
qixingbao
"
;
//类信息
//类信息
public
static
final
String
TABLE
=
"
user
"
;
public
static
final
String
TABLE
=
"
product
"
;
public
static
final
String
CLASSNAME
=
"
User
"
;
public
static
final
String
CLASSNAME
=
"
Product
"
;
public
static
final
String
CLASSCOMMENT
=
"
用户信息
"
;
public
static
final
String
CLASSCOMMENT
=
"
产品
"
;
public
static
final
String
TIME
=
"2018年
6月30
日"
;
public
static
final
String
TIME
=
"2018年
7月5
日"
;
public
static
final
String
AGILE
=
new
Date
().
getTime
()+
""
;
public
static
final
String
AGILE
=
new
Date
().
getTime
()+
""
;
//路径信息
//路径信息
public
static
final
String
ENTITY_URL
=
"com.
xin.dealcenter
.entity"
;
public
static
final
String
ENTITY_URL
=
"com.
qixingbao.show
.entity"
;
public
static
final
String
DAO_URL
=
"com.
xin.dealcenter
.dao"
;
public
static
final
String
DAO_URL
=
"com.
qixingbao.show
.dao"
;
public
static
final
String
XML_URL
=
"com.
xin.dealcenter
.dao.impl"
;
public
static
final
String
XML_URL
=
"com.
qixingbao.show
.dao.impl"
;
public
static
final
String
SERVICE_URL
=
"com.
xin.dealcenter
.service"
;
public
static
final
String
SERVICE_URL
=
"com.
qixingbao.show
.service"
;
public
static
final
String
SERVICE_IMPL_URL
=
"com.
xin.dealcenter
.service.impl"
;
public
static
final
String
SERVICE_IMPL_URL
=
"com.
qixingbao.show
.service.impl"
;
public
static
final
String
CONTROLLER_URL
=
"com.
xin.dealcenter
.webApi"
;
public
static
final
String
CONTROLLER_URL
=
"com.
qixingbao.show
.webApi"
;
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
@@ -41,19 +41,19 @@ public class TestMain {
...
@@ -41,19 +41,19 @@ public class TestMain {
bi
.
setEntityComment
(
CLASSCOMMENT
);
bi
.
setEntityComment
(
CLASSCOMMENT
);
try
{
try
{
bi
=
EntityInfoUtil
.
getInfo
(
bi
);
bi
=
EntityInfoUtil
.
getInfo
(
bi
);
String
aa1
=
Generator
.
createEntity
(
"E:\\
test_workspace\\mybatis-generator
\\src\\main\\java\\"
,
bi
).
toString
();
String
aa1
=
Generator
.
createEntity
(
"E:\\
A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show
\\src\\main\\java\\"
,
bi
).
toString
();
/*String aa2=Generator.createDao("E:\\test_workspace\\mybatis-generator
\\src\\main\\java\\", bi).toString();
String
aa2
=
Generator
.
createDao
(
"E:\\A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show
\\src\\main\\java\\"
,
bi
).
toString
();
String aa3=Generator.createDaoImpl("E:\\
test_workspace\\mybatis-generator
\\src\\main\\java\\", bi).toString();
String
aa3
=
Generator
.
createDaoImpl
(
"E:\\
A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show
\\src\\main\\java\\"
,
bi
).
toString
();
String aa4=Generator.createService("E:\\
test_workspace\\mybatis-generator
\\src\\main\\java\\", bi).toString();
String
aa4
=
Generator
.
createService
(
"E:\\
A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show
\\src\\main\\java\\"
,
bi
).
toString
();
String aa5=Generator.createServiceImpl("E:\\
test_workspace\\mybatis-generator
\\src\\main\\java\\", bi).toString();
String
aa5
=
Generator
.
createServiceImpl
(
"E:\\
A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show
\\src\\main\\java\\"
,
bi
).
toString
();
String aa6=Generator.createController("E:\\
test_workspace\\mybatis-generator\\src\\main\\java\\", bi).toString();*/
String
aa6
=
Generator
.
createController
(
"E:\\
A-ZM-work\\work_qxb2\\qxbplatform\\qixingbao-show\\src\\main\\java\\"
,
bi
).
toString
();
System
.
out
.
println
(
aa1
);
System
.
out
.
println
(
aa1
);
/*
System.out.println(aa2);
System
.
out
.
println
(
aa2
);
System
.
out
.
println
(
aa3
);
System
.
out
.
println
(
aa3
);
System
.
out
.
println
(
aa4
);
System
.
out
.
println
(
aa4
);
System
.
out
.
println
(
aa5
);
System
.
out
.
println
(
aa5
);
System.out.println(aa6);
*/
System
.
out
.
println
(
aa6
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
src/main/java/com/github/mybatis/util/EntityInfoUtil.java
View file @
0e69ee74
...
@@ -29,19 +29,27 @@ public class EntityInfoUtil {
...
@@ -29,19 +29,27 @@ public class EntityInfoUtil {
String
comment
=
executeQuery
.
getString
(
3
);
String
comment
=
executeQuery
.
getString
(
3
);
PropertyInfo
ci
=
new
PropertyInfo
();
PropertyInfo
ci
=
new
PropertyInfo
();
ci
.
setColumn
(
column
);
ci
.
setColumn
(
column
);
if
(
jdbcType
.
equals
(
"int"
))
{
if
(
jdbcType
.
equals
IgnoreCase
(
"int"
))
{
ci
.
setJdbcType
(
"Integer"
);
ci
.
setJdbcType
(
"Integer"
);
}
else
if
(
jdbcType
.
equalsIgnoreCase
(
"datetime"
))
{
ci
.
setJdbcType
(
"timestamp"
);
}
else
{
}
else
{
ci
.
setJdbcType
(
jdbcType
);
ci
.
setJdbcType
(
jdbcType
);
}
}
ci
.
setComment
(
comment
);
ci
.
setComment
(
comment
);
ci
.
setProperty
(
MySqlToJavaUtil
.
changeToJavaFiled
(
column
));
ci
.
setProperty
(
MySqlToJavaUtil
.
changeToJavaFiled
(
column
));
ci
.
setJavaType
(
MySqlToJavaUtil
.
jdbcTypeToJavaType
(
jdbcType
));
ci
.
setJavaType
(
MySqlToJavaUtil
.
jdbcTypeToJavaType
(
jdbcType
));
//设置注解类型
if
(
column
.
equalsIgnoreCase
(
"id"
))
{
bi
.
setIdType
(
ci
.
getJavaType
());
bi
.
setIdJdbcType
(
ci
.
getJdbcType
());
}
columns
.
add
(
ci
);
columns
.
add
(
ci
);
}
}
bi
.
setCis
(
columns
);
bi
.
setCis
(
columns
);
return
bi
;
return
bi
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"自动生成实体类错误:"
+
e
.
getMessage
());
throw
new
RuntimeException
(
"自动生成实体类错误:"
+
e
.
getMessage
());
}
finally
{
}
finally
{
pstemt
.
close
();
pstemt
.
close
();
...
...
src/main/resources/freemarker/ftl/controller.ftl
View file @
0e69ee74
...
@@ -55,8 +55,8 @@ public class ${entityName}Controller {
...
@@ -55,8 +55,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
=
"
${idType}
"
)
public
JsonResult
<${
entityName
}>
get
${
entityName
}
ById
(@
PathVariable
(
"id"
)
Long
id
){
public
JsonResult
<${
entityName
}>
get
${
entityName
}
ById
(@
PathVariable
(
"id"
)
${
idType
}
id
){
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>();
JsonResult
<${
entityName
}>
result
=
new
JsonResult
<${
entityName
}>();
try
{
try
{
${
entityName
}
${
objectName
}=${
objectName
}
ServiceImpl
.
selectByPrimaryKey
(
id
);
${
entityName
}
${
objectName
}=${
objectName
}
ServiceImpl
.
selectByPrimaryKey
(
id
);
...
@@ -116,9 +116,9 @@ public class ${entityName}Controller {
...
@@ -116,9 +116,9 @@ public class ${entityName}Controller {
*/
*/
@
PostMapping
(
"/deleteByPrimaryKey"
)
@
PostMapping
(
"/deleteByPrimaryKey"
)
@
ApiOperation
(
value
=
"删除${entityComment}"
,
notes
=
"删除${entityComment},作者:${author}"
)
@
ApiOperation
(
value
=
"删除${entityComment}"
,
notes
=
"删除${entityComment},作者:${author}"
)
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"id"
,
value
=
"${entityComment}id"
,
required
=
true
,
dataType
=
"
Long
"
)
@
ApiImplicitParam
(
paramType
=
"query"
,
name
=
"id"
,
value
=
"${entityComment}id"
,
required
=
true
,
dataType
=
"
${idType}
"
)
public
JsonResult
deleteByPrimaryKey
(
Long
id
){
public
JsonResult
<
Object
>
deleteByPrimaryKey
(${
idType
}
id
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<
Object
>
result
=
new
JsonResult
<
Object
>
();
try
{
try
{
int
reg
=${
objectName
}
ServiceImpl
.
deleteByPrimaryKey
(
id
);
int
reg
=${
objectName
}
ServiceImpl
.
deleteByPrimaryKey
(
id
);
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
<
${
entityName
}
>
query
${
entityName
}
List
(${
entityName
}
${
objectName
}){
public
JsonResult
<
List
<${
entityName
}>
>
query
${
entityName
}
List
(${
entityName
}
${
objectName
}){
JsonResult
<
${
entityName
}>
result
=
new
JsonResult
<${
entityName
}
>();
JsonResult
<
List
<${
entityName
}>>
result
=
new
JsonResult
<
List
<${
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
<
${
entityName
}
>
get
${
entityName
}
BySearch
(
Integer
pageNum
,
Integer
pageSize
){
public
JsonResult
<
PageInfo
<${
entityName
}>
>
get
${
entityName
}
BySearch
(
Integer
pageNum
,
Integer
pageSize
){
JsonResult
<
${
entityName
}>
result
=
new
JsonResult
<${
entityName
}
>();
JsonResult
<
PageInfo
<${
entityName
}>>
result
=
new
JsonResult
<
PageInfo
<${
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
);
...
...
src/main/resources/freemarker/ftl/dao.ftl
View file @
0e69ee74
...
@@ -21,9 +21,9 @@ import ${entityUrl}.${entityName};
...
@@ -21,9 +21,9 @@ import ${entityUrl}.${entityName};
@
Mapper
@
Mapper
public
interface
${
entityName
}
Dao
{
public
interface
${
entityName
}
Dao
{
public
${
entityName
}
selectByPrimaryKey
(
Long
id
);
public
${
entityName
}
selectByPrimaryKey
(
${
idType
}
id
);
public
int
deleteByPrimaryKey
(
Long
id
);
public
int
deleteByPrimaryKey
(
${
idType
}
id
);
public
int
insertSelective
(${
entityName
}
${
objectName
});
public
int
insertSelective
(${
entityName
}
${
objectName
});
...
...
src/main/resources/freemarker/ftl/mapper.ftl
View file @
0e69ee74
...
@@ -10,21 +10,21 @@
...
@@ -10,21 +10,21 @@
${agile}
${agile}
</sql>
</sql>
<!-- 查询 -->
<!-- 查询 -->
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
${idType}
"
resultMap=
"BaseResultMap"
>
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from ${table}
from ${table}
where id = ${r'#{
id,jdbcType=BIGINT}'
}
where id = ${r'#{
'}id,jdbcType=${idJdbcType?upper_case}
}
</select>
</select>
<!-- 删除 -->
<!-- 删除 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
${idType}
"
>
delete from ${table}
delete from ${table}
where id = ${r'#{
id,jdbcType=BIGINT}'
}
where id = ${r'#{
'}id,jdbcType=${idJdbcType?upper_case}
}
</delete>
</delete>
<!-- 选择添加 -->
<!-- 选择添加 -->
<insert
id=
"insertSelective"
parameterType=
"${entityUrl}.${entityName}"
>
<insert
id=
"insertSelective"
parameterType=
"${entityUrl}.${entityName}"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
Long
"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.
${idType}
"
>
SELECT
SELECT
LAST_INSERT_ID()
LAST_INSERT_ID()
</selectKey>
</selectKey>
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</if>
</if>
<
/#list>
<
/#list>
</set>
</set>
where id = ${r'#{
id,jdbcType=BIGINT}'
}
where id = ${r'#{
'}id,jdbcType=${idJdbcType}
}
</update>
</update>
<!-- 组合条件查询 -->
<!-- 组合条件查询 -->
<select
id=
"query${entityName}List"
parameterType=
"${entityUrl}.${entityName}"
<select
id=
"query${entityName}List"
parameterType=
"${entityUrl}.${entityName}"
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
from ${table}
from ${table}
<where>
<where>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
id = ${r'#{'}id,jdbcType=
BIGINT
}
id = ${r'#{'}id,jdbcType=
${idJdbcType?upper_case}
}
</if>
</if>
<
#list cis as ci>
<
#list cis as ci>
<
#if ci.column!="id">
<
#if ci.column!="id">
...
...
src/main/resources/freemarker/ftl/service.ftl
View file @
0e69ee74
...
@@ -27,7 +27,7 @@ public interface ${entityName}Service {
...
@@ -27,7 +27,7 @@ public interface ${entityName}Service {
*
@
return
${
entityName
}
*
@
return
${
entityName
}
*
@
author
${
author
}
*
@
author
${
author
}
*/
*/
public
${
entityName
}
selectByPrimaryKey
(
Long
id
);
public
${
entityName
}
selectByPrimaryKey
(
${
idType
}
id
);
/**
/**
*
@
explain
删除
${
entityComment
}
对象
*
@
explain
删除
${
entityComment
}
对象
...
@@ -35,7 +35,7 @@ public interface ${entityName}Service {
...
@@ -35,7 +35,7 @@ public interface ${entityName}Service {
*
@
return
int
*
@
return
int
*
@
author
${
author
}
*
@
author
${
author
}
*/
*/
public
int
deleteByPrimaryKey
(
Long
id
);
public
int
deleteByPrimaryKey
(
${
idType
}
id
);
/**
/**
*
@
explain
添加
${
entityComment
}
对象
*
@
explain
添加
${
entityComment
}
对象
...
...
src/main/resources/freemarker/ftl/serviceImpl.ftl
View file @
0e69ee74
...
@@ -34,13 +34,13 @@ public class ${entityName}ServiceImpl implements ${entityName}Service {
...
@@ -34,13 +34,13 @@ public class ${entityName}ServiceImpl implements ${entityName}Service {
//
查询对象
//
查询对象
@
Override
@
Override
public
${
entityName
}
selectByPrimaryKey
(
Long
id
)
{
public
${
entityName
}
selectByPrimaryKey
(
${
idType
}
id
)
{
return
${
objectName
}
Dao
.
selectByPrimaryKey
(
id
);
return
${
objectName
}
Dao
.
selectByPrimaryKey
(
id
);
}
}
//
删除对象
//
删除对象
@
Override
@
Override
public
int
deleteByPrimaryKey
(
Long
id
)
{
public
int
deleteByPrimaryKey
(
${
idType
}
id
)
{
return
${
objectName
}
Dao
.
deleteByPrimaryKey
(
id
);
return
${
objectName
}
Dao
.
deleteByPrimaryKey
(
id
);
}
}
...
...
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