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
aff1c1ba
Commit
aff1c1ba
authored
Apr 11, 2019
by
flying-cattle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档更新
parent
38dc7e42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
353 additions
and
561 deletions
+353
-561
README.md
README.md
+353
-560
dao.ftl
src/main/resources/freemarker/ftl/dao.ftl
+0
-1
No files found.
README.md
View file @
aff1c1ba
# mybatis-dsc-generato
# mybatis-dsc-generato
集成最全的代码生成工具:entity集成lombok
,格式校验,swagger; dao自动加@ mapper,service自动注释和依赖; 控制器实现单表的增副改查,并集成swagger实现api文档。如果有缘看见,期望得到你的star,very thx.
完美集成lombok,swagger的代码生成工具,让你不再为繁琐的注释和简单的接口实现而烦恼:entity集成
,格式校验,swagger; dao自动加@ mapper,service自动注释和依赖; 控制器实现单表的增副改查,并集成swagger实现api文档。如果有缘看见,期望得到你的star,very thx.
# 源码地址
# 源码地址
-
GitHub:https://github.com/flying-cattle/mybatis-dsc-generator
-
GitHub:https://github.com/flying-cattle/mybatis-dsc-generator
-
码云:https://gitee.com/flying-cattle/mybatis-dsc-generator
-
码云:https://gitee.com/flying-cattle/mybatis-dsc-generator
# MAVEN地址
# MAVEN地址
2.
1.0版本是未集成Mybatis-plus版本——源码分支master
```
xml
<dependency>
<groupId>
com.github.flying-cattle
</groupId>
<artifactId>
mybatis-dsc-generator
</artifactId>
<version>
2.1.0.RELEASE
</version>
</dependency>
```
3.
0.0版本是集成了Mybatis-plus版本——源码分支mybatisPlus
```
xml
```
xml
<dependency>
<dependency>
<groupId>
com.github.flying-cattle
</groupId>
<groupId>
com.github.flying-cattle
</groupId>
...
@@ -12,26 +21,26 @@
...
@@ -12,26 +21,26 @@
<version>
2.1.0.RELEASE
</version>
<version>
2.1.0.RELEASE
</version>
</dependency>
</dependency>
```
```
# 数据表结构样式
# 数据表结构样式
```
sql
```
sql
CREATE
TABLE
`
ord
er`
(
CREATE
TABLE
`
us
er`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'ID'
,
`order_no`
varchar
(
50
)
NOT
NULL
COMMENT
'订单编号'
,
`login_name`
varchar
(
40
)
DEFAULT
NULL
COMMENT
'登录名'
,
`uid`
bigint
(
20
)
NOT
NULL
COMMENT
'用户ID'
,
`password`
varchar
(
100
)
NOT
NULL
COMMENT
'秘密'
,
`source`
varchar
(
50
)
NOT
NULL
COMMENT
'来源'
,
`nickname`
varchar
(
50
)
NOT
NULL
COMMENT
'昵称'
,
`product_id`
bigint
(
20
)
NOT
NULL
COMMENT
'产品ID'
,
`type`
int
(
10
)
unsigned
DEFAULT
NULL
COMMENT
'类型'
,
`product_name`
varchar
(
100
)
NOT
NULL
COMMENT
'产品名字'
,
`state`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'1'
COMMENT
'状态:-1失败,0等待,1成功'
,
`unit_price`
int
(
10
)
unsigned
NOT
NULL
COMMENT
'单价'
,
`note`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`number`
int
(
10
)
unsigned
NOT
NULL
COMMENT
'数量'
,
`create_time`
timestamp
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`selling_price`
int
(
11
)
DEFAULT
NULL
COMMENT
'卖价'
,
`update_time`
timestamp
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
`state`
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'0等待支付,1支付成功,2支付失败,3撤销'
,
`update_uid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'修改人用户ID'
,
`create_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`login_ip`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'登录IP地址'
,
`update_time`
timestamp
NULL
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'交易变化时间'
,
`login_addr`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'登录地址'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
),
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'订单信息'
;
UNIQUE
KEY
`login_name`
(
`login_name`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
13
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_0900_ai_ci
;
```
```
要求必须有表注释,要求必须有主键为id,
切为bigint,所有字段必须有注释(便于生成java注释
)。
要求必须有表注释,要求必须有主键为id,
所有字段必须有注释(便于生成java注释swagger等
)。
# 生成的实体类
# 生成的实体类
生成方法参考源码中的:https://github.com/flying-cattle/mybatis-dsc-generator/blob/master/src/main/java/com/github/mybatis/test/TestMain.java
生成方法参考源码中的:https://github.com/flying-cattle/mybatis-dsc-generator/blob/master/src/main/java/com/github/mybatis/test/TestMain.java
...
@@ -44,99 +53,107 @@ CREATE TABLE `order` (
...
@@ -44,99 +53,107 @@ CREATE TABLE `order` (
* Copyright(c) 2018 BianP Co. Ltd.
* Copyright(c) 2018 BianP Co. Ltd.
* All right reserved.
* All right reserved.
*/
*/
package
com
.
xin
.
dealcenter
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
lombok.AllArgsConstructor
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
/**
/**
* Copyright: Copyright (c) 2019
*
*
* @Description: 订单
* <p>说明: 用户实体类</P>
* @Author: BianP
* @version: V1.0
* @CreateDate: 2018年7月5日
* @author: BianPeng
* @Version: V1.0
*
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------------*
* 2019年4月9日 BianPeng V1.0 initialize
*/
*/
@Data
@Data
@AllArgsConstructor
@EqualsAndHashCode
(
callSuper
=
false
)
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Order
implements
Serializable
{
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
private
static
final
long
serialVersionUID
=
1531104207412L
;
@Accessors
(
chain
=
true
)
public
class
User
extends
Model
<
User
>
{
@ApiModelProperty
(
name
=
"id"
,
value
=
"ID"
)
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
name
=
"id"
,
value
=
"用户ID"
)
private
Long
id
;
private
Long
id
;
@ApiModelProperty
(
name
=
"orderNo"
,
value
=
"订单编号"
)
private
String
orderNo
;
@ApiModelProperty
(
name
=
"loginName"
,
value
=
"登录账户"
)
@ApiModelProperty
(
name
=
"uid"
,
value
=
"用户ID"
)
private
String
loginName
;
private
Long
uid
;
@ApiModelProperty
(
name
=
"source"
,
value
=
"来源"
)
@ApiModelProperty
(
name
=
"password"
,
value
=
"登录密码"
)
private
String
source
;
private
String
password
;
@ApiModelProperty
(
name
=
"productId"
,
value
=
"产品ID"
)
private
Long
productId
;
@ApiModelProperty
(
name
=
"nickname"
,
value
=
"用户昵称"
)
@ApiModelProperty
(
name
=
"productName"
,
value
=
"产品名字"
)
private
String
nickname
;
private
String
productName
;
@ApiModelProperty
(
name
=
"unitPrice"
,
value
=
"单价"
)
@ApiModelProperty
(
name
=
"type"
,
value
=
"用户类型"
)
private
Integer
unitPrice
;
private
Integer
type
;
@ApiModelProperty
(
name
=
"number"
,
value
=
"数量"
)
private
Integer
number
;
@ApiModelProperty
(
name
=
"state"
,
value
=
"用户状态"
)
@ApiModelProperty
(
name
=
"sellingPrice"
,
value
=
"卖价"
)
private
Integer
sellingPrice
;
@ApiModelProperty
(
name
=
"state"
,
value
=
"0等待支付,1支付成功,2支付失败,3撤销"
)
private
Integer
state
;
private
Integer
state
;
@ApiModelProperty
(
name
=
"note"
,
value
=
"备注"
)
private
String
note
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"创建时间"
)
@ApiModelProperty
(
name
=
"createTime"
,
value
=
"
用户
创建时间"
)
private
Date
createTime
;
private
Date
createTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@ApiModelProperty
(
name
=
"updateTime"
,
value
=
"
交易变化
时间"
)
@ApiModelProperty
(
name
=
"updateTime"
,
value
=
"
修改
时间"
)
private
Date
updateTime
;
private
Date
updateTime
;
}
@ApiModelProperty
(
name
=
"updateUid"
,
value
=
"修改人用户ID"
)
private
Long
updateUid
;
@ApiModelProperty
(
name
=
"loginIp"
,
value
=
"登录IP"
)
private
String
loginIp
;
@ApiModelProperty
(
name
=
"loginIp"
,
value
=
"登录地址"
)
private
String
loginAddr
;
@Override
protected
Serializable
pkVal
()
{
return
this
.
id
;
}
}
```
```
# 生成的DAO
# 生成的DAO
```
java
```
java
/**
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
* @filename:OrderDao 2018年7月5日
* @project deal-center V1.0
* Copyright(c) 2018 BianP Co. Ltd.
* All right reserved.
*/
package
com
.
xin
.
dealcenter
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.xin.
dealcenter.entity.Ord
er
;
import
com.xin.
usercenter.entity.Us
er
;
/**
/**
* Copyright: Copyright (c) 2019
*
*
* @Description: 订单——DAO
* <p>说明: 用户数据访问层</P>
* @Author: BianP
* @version: V1.0
* @CreateDate: 2018年7月5日
* @author: BianPeng
* @Version: V1.0
*
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------------*
* 2019年4月9日 BianPeng V1.0 initialize
*/
*/
@Mapper
@Mapper
public
interface
OrderDao
{
public
interface
UserDao
extends
BaseMapper
<
User
>
{
public
Order
selectByPrimaryKey
(
Long
id
);
public
int
deleteByPrimaryKey
(
Long
id
);
public
int
insertSelective
(
Order
order
);
public
int
updateByPrimaryKeySelective
(
Order
order
);
public
List
<
Order
>
queryOrderList
(
Order
order
);
}
}
```
```
...
@@ -144,593 +161,369 @@ public interface OrderDao {
...
@@ -144,593 +161,369 @@ public interface OrderDao {
```
xml
```
xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.xin.dealcenter.dao.OrderDao"
>
<mapper
namespace=
"com.xin.usercenter.dao.UserDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.xin.dealcenter.entity.Order"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<resultMap
id=
"BaseResultMap"
type=
"com.xin.usercenter.entity.User"
>
<id
column=
"order_no"
jdbcType=
"VARCHAR"
property=
"orderNo"
/>
<id
column=
"id"
property=
"id"
/>
<id
column=
"uid"
jdbcType=
"BIGINT"
property=
"uid"
/>
<id
column=
"login_name"
property=
"loginName"
/>
<id
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<id
column=
"password"
property=
"password"
/>
<id
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
<id
column=
"nickname"
property=
"nickname"
/>
<id
column=
"product_name"
jdbcType=
"VARCHAR"
property=
"productName"
/>
<id
column=
"type"
property=
"type"
/>
<id
column=
"unit_price"
jdbcType=
"INTEGER"
property=
"unitPrice"
/>
<id
column=
"state"
property=
"state"
/>
<id
column=
"number"
jdbcType=
"INTEGER"
property=
"number"
/>
<id
column=
"note"
property=
"note"
/>
<id
column=
"selling_price"
jdbcType=
"INTEGER"
property=
"sellingPrice"
/>
<id
column=
"create_time"
property=
"createTime"
/>
<id
column=
"state"
jdbcType=
"INTEGER"
property=
"state"
/>
<id
column=
"update_time"
property=
"updateTime"
/>
<id
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<id
column=
"update_uid"
property=
"updateUid"
/>
<id
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<id
column=
"login_ip"
property=
"loginIp"
/>
<id
column=
"login_addr"
property=
"loginAddr"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, order_no, uid, source, product_id, product_name, unit_price, number, selling_price, state, create_time, update_time
id, login_name, password, nickname, type, state, note, create_time, update_time, update_uid, login_ip, login_addr
</sql>
</sql>
<!-- 查询 -->
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from order
where id = #{id,jdbcType=BIGINT}
</select>
<!-- 删除 -->
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from order
where id = #{id,jdbcType=BIGINT}
</delete>
<!-- 选择添加 -->
<insert
id=
"insertSelective"
parameterType=
"com.xin.dealcenter.entity.Order"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT
LAST_INSERT_ID()
</selectKey>
insert into order
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"orderNo != null"
>
order_no,
</if>
<if
test=
"uid != null"
>
uid,
</if>
<if
test=
"source != null"
>
source,
</if>
<if
test=
"productId != null"
>
product_id,
</if>
<if
test=
"productName != null"
>
product_name,
</if>
<if
test=
"unitPrice != null"
>
unit_price,
</if>
<if
test=
"number != null"
>
number,
</if>
<if
test=
"sellingPrice != null"
>
selling_price,
</if>
<if
test=
"state != null"
>
state,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"orderNo != null"
>
#{orderNo,jdbcType=VARCHAR},
</if>
<if
test=
"uid != null"
>
#{uid,jdbcType=BIGINT},
</if>
<if
test=
"source != null"
>
#{source,jdbcType=VARCHAR},
</if>
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
<if
test=
"productName != null"
>
#{productName,jdbcType=VARCHAR},
</if>
<if
test=
"unitPrice != null"
>
#{unitPrice,jdbcType=INTEGER},
</if>
<if
test=
"number != null"
>
#{number,jdbcType=INTEGER},
</if>
<if
test=
"sellingPrice != null"
>
#{sellingPrice,jdbcType=INTEGER},
</if>
<if
test=
"state != null"
>
#{state,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<!-- 选择修改 -->
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.xin.dealcenter.entity.Order"
>
update order
<set>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT},
</if>
<if
test=
"orderNo != null"
>
order_no = #{orderNo,jdbcType=VARCHAR},
</if>
<if
test=
"uid != null"
>
uid = #{uid,jdbcType=BIGINT},
</if>
<if
test=
"source != null"
>
source = #{source,jdbcType=VARCHAR},
</if>
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
<if
test=
"productName != null"
>
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if
test=
"unitPrice != null"
>
unit_price = #{unitPrice,jdbcType=INTEGER},
</if>
<if
test=
"number != null"
>
number = #{number,jdbcType=INTEGER},
</if>
<if
test=
"sellingPrice != null"
>
selling_price = #{sellingPrice,jdbcType=INTEGER},
</if>
<if
test=
"state != null"
>
state = #{state,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<!-- 组合条件查询 -->
<select
id=
"queryOrderList"
parameterType=
"com.xin.dealcenter.entity.Order"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from order
<where>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"orderNo != null"
>
AND order_no = #{orderNo ,jdbcType=VARCHAR}
</if>
<if
test=
"uid != null"
>
AND uid = #{uid ,jdbcType=BIGINT}
</if>
<if
test=
"source != null"
>
AND source = #{source ,jdbcType=VARCHAR}
</if>
<if
test=
"productId != null"
>
AND product_id = #{productId ,jdbcType=BIGINT}
</if>
<if
test=
"productName != null"
>
AND product_name = #{productName ,jdbcType=VARCHAR}
</if>
<if
test=
"unitPrice != null"
>
AND unit_price = #{unitPrice ,jdbcType=INTEGER}
</if>
<if
test=
"number != null"
>
AND number = #{number ,jdbcType=INTEGER}
</if>
<if
test=
"sellingPrice != null"
>
AND selling_price = #{sellingPrice ,jdbcType=INTEGER}
</if>
<if
test=
"state != null"
>
AND state = #{state ,jdbcType=INTEGER}
</if>
<if
test=
"createTime != null"
>
AND create_time = #{createTime ,jdbcType=TIMESTAMP}
</if>
<if
test=
"updateTime != null"
>
AND update_time = #{updateTime ,jdbcType=TIMESTAMP}
</if>
</where>
</select>
</mapper>
</mapper>
```
```
# 生成的SERVICE
# 生成的SERVICE
```
java
```
java
import
com.xin.usercenter.entity.User
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
/**
* @filename:OrderService 2018年7月5日
* Copyright: Copyright (c) 2019
* @project deal-center V1.0
* Copyright(c) 2018 BianP Co. Ltd.
* All right reserved.
*/
package
com
.
xin
.
dealcenter
.
service
;
import
java.util.List
;
import
com.github.pagehelper.PageInfo
;
import
com.item.util.AppPage
;
import
com.xin.dealcenter.entity.Order
;
/**
*
*
* @Description: 订单——SERVICE
* <p>说明: 用户服务层</P>
* @Author: BianP
* @version: V1.0
* @CreateDate: 2018年7月5日
* @author: BianPeng
* @Version: V1.0
*
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------------*
* 2019年4月9日 BianPeng V1.0 initialize
*/
*/
public
interface
OrderService
{
public
interface
UserService
extends
IService
<
User
>
{
/**
* @explain 查询订单对象
* @param 对象参数:id
* @return Order
* @author BianP
*/
public
Order
selectByPrimaryKey
(
Long
id
);
/**
* @explain 删除订单对象
* @param 对象参数:id
* @return int
* @author BianP
*/
public
int
deleteByPrimaryKey
(
Long
id
);
/**
* @explain 添加订单对象
* @param 对象参数:Order
* @return int
* @author BianP
*/
public
int
insertSelective
(
Order
order
);
/**
* @explain 修改订单对象
* @param 对象参数:Order
* @return int
* @author BianP
*/
public
int
updateByPrimaryKeySelective
(
Order
order
);
/**
* @explain 查询订单集合
* @param 对象参数:Order
* @return List<Order>
* @author BianP
*/
public
List
<
Order
>
queryOrderList
(
Order
order
);
/**
* @explain 分页查询订单
* @param 对象参数:Order
* @return PageInfo<Order>
* @author BianP
*/
public
PageInfo
<
Order
>
getOrderBySearch
(
AppPage
<
Order
>
page
);
}
}
```
```
# 生成的SERVICE_IMPL
# 生成的SERVICE_IMPL
```
java
```
java
/**
import
com.xin.usercenter.entity.User
;
* @filename:OrderServiceImpl 2018年7月5日
import
com.xin.usercenter.dao.UserDao
;
* @project deal-center V1.0
import
com.xin.usercenter.service.UserService
;
* Copyright(c) 2018 BianP Co. Ltd.
* All right reserved.
*/
package
com
.
xin
.
dealcenter
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.item.util.AppPage
;
import
com.xin.dealcenter.entity.Order
;
import
com.xin.dealcenter.dao.OrderDao
;
import
com.xin.dealcenter.service.OrderService
;
/**
/**
* Copyright: Copyright (c) 2019
*
*
* @Description: 订单——SERVICEIMPL
* <p>说明: 用户服务实现层</P>
* @Author: BianP
* @version: V1.0
* @CreateDate: 2018年7月5日
* @author: BianPeng
* @Version: V1.0
*
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------------*
* 2019年4月9日 BianPeng V1.0 initialize
*/
*/
@Service
@Service
public
class
OrderServiceImpl
implements
OrderService
{
public
class
UserServiceImpl
extends
ServiceImpl
<
UserDao
,
User
>
implements
UserService
{
@Autowired
public
OrderDao
orderDao
;
//查询对象
@Override
public
Order
selectByPrimaryKey
(
Long
id
)
{
return
orderDao
.
selectByPrimaryKey
(
id
);
}
//删除对象
@Override
public
int
deleteByPrimaryKey
(
Long
id
)
{
return
orderDao
.
deleteByPrimaryKey
(
id
);
}
//添加对象
@Override
public
int
insertSelective
(
Order
order
)
{
return
orderDao
.
insertSelective
(
order
);
}
//修改对象
@Override
public
int
updateByPrimaryKeySelective
(
Order
order
)
{
return
orderDao
.
updateByPrimaryKeySelective
(
order
);
}
//查询集合
@Override
public
List
<
Order
>
queryOrderList
(
Order
order
)
{
return
orderDao
.
queryOrderList
(
order
);
}
//分页查询
@Override
public
PageInfo
<
Order
>
getOrderBySearch
(
AppPage
<
Order
>
page
)
{
// TODO Auto-generated method stub
PageHelper
.
startPage
(
page
.
getPageNum
(),
page
.
getPageSize
());
List
<
Order
>
list
=
orderDao
.
queryOrderList
(
page
.
getParam
());
PageInfo
<
Order
>
pageInfo
=
new
PageInfo
<
Order
>(
list
);
return
pageInfo
;
}
}
}
```
```
# 生成的CONTROLLER
# 生成的CONTROLLER
```
java
```
java
/**
import
com.item.util.JsonResult
;
* @filename:OrderController 2018年7月5日
import
com.xin.usercenter.entity.User
;
* @project deal-center V1.0
import
com.xin.usercenter.service.UserService
;
* Copyright(c) 2018 BianP Co. Ltd.
* All right reserved.
*/
package
com
.
xin
.
dealcenter
.
webApi
;
import
java.util.List
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageInfo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.item.util.AppPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.item.util.JsonResult
;
import
com.xin.dealcenter.entity.Order
;
import
com.xin.dealcenter.service.OrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
/**
* Copyright: Copyright (c) 2019
*
*
* @Description: 订单接口层
* <p>说明: 用户API接口层</P>
* @Author: BianP
* @version: V1.0
* @CreateDate: 2018年7月5日
* @author: BianPeng
* @Version: V1.0
*
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------------*
* 2019年4月9日 BianPeng V1.0 initialize
*/
*/
@Api
(
description
=
"
订单"
,
value
=
"订单
"
)
@Api
(
description
=
"
用户"
,
value
=
"用户
"
)
@RestController
@RestController
@RequestMapping
(
"/
ord
er"
)
@RequestMapping
(
"/
us
er"
)
public
class
Ord
erController
{
public
class
Us
erController
{
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
@Autowired
@Autowired
public
OrderService
ord
erServiceImpl
;
public
UserService
us
erServiceImpl
;
/**
/**
* @explain 查询
订单
对象 <swagger GET请求>
* @explain 查询
用户
对象 <swagger GET请求>
* @param 对象参数:id
* @param 对象参数:id
* @return
ord
er
* @return
us
er
* @author BianP
* @author BianP
eng
* @time 201
8年7月5
日
* @time 201
9年4月9
日
*/
*/
@GetMapping
(
"/get
Ord
erById/{id}"
)
@GetMapping
(
"/get
Us
erById/{id}"
)
@ApiOperation
(
value
=
"获取
订单信息"
,
notes
=
"获取订单信息[order],作者:BianP
"
)
@ApiOperation
(
value
=
"获取
用户信息"
,
notes
=
"获取用户信息[user],作者:BianPeng
"
)
@ApiImplicitParam
(
paramType
=
"path"
,
name
=
"id"
,
value
=
"
订单
id"
,
required
=
true
,
dataType
=
"Long"
)
@ApiImplicitParam
(
paramType
=
"path"
,
name
=
"id"
,
value
=
"
用户
id"
,
required
=
true
,
dataType
=
"Long"
)
public
JsonResult
getOrd
erById
(
@PathVariable
(
"id"
)
Long
id
){
public
JsonResult
<
User
>
getUs
erById
(
@PathVariable
(
"id"
)
Long
id
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<
User
>
result
=
new
JsonResult
<
User
>
();
try
{
try
{
Order
order
=
orderServiceImpl
.
selectByPrimaryKey
(
id
);
User
user
=
userServiceImpl
.
getById
(
id
);
if
(
ord
er
!=
null
)
{
if
(
us
er
!=
null
)
{
result
.
set
Code
(
1
);
result
.
set
Type
(
"success"
);
result
.
setMessage
(
"成功"
);
result
.
setMessage
(
"成功"
);
result
.
setData
(
ord
er
);
result
.
setData
(
us
er
);
}
else
{
}
else
{
logger
.
error
(
"获取
订单
失败ID:"
+
id
);
logger
.
error
(
"获取
用户
失败ID:"
+
id
);
result
.
set
Code
(-
1
);
result
.
set
Type
(
"fail"
);
result
.
setMessage
(
"你获取的
订单
不存在"
);
result
.
setMessage
(
"你获取的
用户
不存在"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取订单执行异常:"
+
e
.
getMessage
());
logger
.
error
(
"获取用户执行异常:"
+
e
.
getMessage
());
result
.
setCode
(-
1
);
result
=
new
JsonResult
<
User
>(
e
);
result
.
setMessage
(
"执行异常,请稍后重试"
);
}
}
return
result
;
return
result
;
}
}
/**
/**
* @explain 添加
订单
对象
* @explain 添加
或者更新用户
对象
* @param 对象参数:
ord
er
* @param 对象参数:
us
er
* @return int
* @return int
* @author BianP
* @author BianP
eng
* @time 201
8年7月5
日
* @time 201
9年4月9
日
*/
*/
@PostMapping
(
"/insertSelective"
)
@PostMapping
(
"/insertSelective"
)
@ApiOperation
(
value
=
"添加
订单"
,
notes
=
"添加订单[order],作者:BianP
"
)
@ApiOperation
(
value
=
"添加
用户"
,
notes
=
"添加用户[user],作者:BianPeng
"
)
public
JsonResult
insertSelective
(
Order
ord
er
){
public
JsonResult
<
User
>
insertSelective
(
User
us
er
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<
User
>
result
=
new
JsonResult
<
User
>
();
try
{
try
{
int
rg
=
orderServiceImpl
.
insertSelective
(
ord
er
);
boolean
rg
=
userServiceImpl
.
saveOrUpdate
(
us
er
);
if
(
rg
>
0
)
{
if
(
rg
)
{
result
.
set
Code
(
1
);
result
.
set
Type
(
"success"
);
result
.
setMessage
(
"成功"
);
result
.
setMessage
(
"成功"
);
result
.
setData
(
ord
er
);
result
.
setData
(
us
er
);
}
else
{
}
else
{
logger
.
error
(
"添加
订单执行失败:"
+
ord
er
.
toString
());
logger
.
error
(
"添加
用户执行失败:"
+
us
er
.
toString
());
result
.
set
Code
(-
1
);
result
.
set
Type
(
"fail"
);
result
.
setMessage
(
"执行失败,请稍后重试"
);
result
.
setMessage
(
"执行失败,请稍后重试"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"添加订单执行异常:"
+
e
.
getMessage
());
logger
.
error
(
"添加用户执行异常:"
+
e
.
getMessage
());
result
.
setCode
(-
1
);
result
=
new
JsonResult
<
User
>(
e
);
result
.
setMessage
(
"执行异常,请稍后重试"
);
}
}
return
result
;
return
result
;
}
}
/**
/**
* @explain 删除
订单
对象
* @explain 删除
用户
对象
* @param 对象参数:id
* @param 对象参数:id
* @return int
* @return int
* @author BianP
* @author BianP
eng
* @time 201
8年7月5
日
* @time 201
9年4月9
日
*/
*/
@PostMapping
(
"/deleteByPrimaryKey"
)
@PostMapping
(
"/deleteByPrimaryKey"
)
@ApiOperation
(
value
=
"删除
订单"
,
notes
=
"删除订单,作者:BianP
"
)
@ApiOperation
(
value
=
"删除
用户"
,
notes
=
"删除用户,作者:BianPeng
"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"id"
,
value
=
"
订单
id"
,
required
=
true
,
dataType
=
"Long"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"id"
,
value
=
"
用户
id"
,
required
=
true
,
dataType
=
"Long"
)
public
JsonResult
deleteByPrimaryKey
(
Long
id
){
public
JsonResult
<
Object
>
deleteByPrimaryKey
(
Long
id
){
JsonResult
result
=
new
JsonResult
();
JsonResult
<
Object
>
result
=
new
JsonResult
<
Object
>
();
try
{
try
{
int
reg
=
orderServiceImpl
.
deleteByPrimaryKey
(
id
);
boolean
reg
=
userServiceImpl
.
removeById
(
id
);
if
(
reg
>
0
)
{
if
(
reg
)
{
result
.
set
Code
(
1
);
result
.
set
Type
(
"success"
);
result
.
setMessage
(
"成功"
);
result
.
setMessage
(
"成功"
);
result
.
setData
(
id
);
result
.
setData
(
id
);
}
else
{
}
else
{
logger
.
error
(
"删除
订单
失败ID:"
+
id
);
logger
.
error
(
"删除
用户
失败ID:"
+
id
);
result
.
set
Code
(-
1
);
result
.
set
Type
(
"fail"
);
result
.
setMessage
(
"执行错误,请稍后重试"
);
result
.
setMessage
(
"执行错误,请稍后重试"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"删除订单执行异常:"
+
e
.
getMessage
());
logger
.
error
(
"删除用户执行异常:"
+
e
.
getMessage
());
result
.
setCode
(-
1
);
result
=
new
JsonResult
<
Object
>(
e
);
result
.
setMessage
(
"执行异常,请稍后重试"
);
}
}
return
result
;
return
result
;
}
}
/**
/**
* @explain
修改订单对象
* @explain
分页条件查询用户
* @param 对象参数:
order
* @param 对象参数:
AppPage<User>
* @return
order
* @return
PageInfo<User>
* @author BianP
* @author BianP
eng
* @time 201
8年7月5
日
* @time 201
9年4月9
日
*/
*/
@ApiOperation
(
value
=
"修改订单"
,
notes
=
"修改订单[order],作者:BianP"
)
@GetMapping
(
"/getUserPages"
)
@PostMapping
(
"/updateByPrimaryKeySelective"
)
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询返回对象[IPage<User>],作者:边鹏"
)
public
JsonResult
updateByPrimaryKeySelective
(
Order
order
){
@ApiImplicitParams
({
JsonResult
result
=
new
JsonResult
();
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageNum"
,
value
=
"当前页"
,
required
=
true
,
dataType
=
"int"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageSize"
,
value
=
"页行数"
,
required
=
true
,
dataType
=
"int"
)
})
public
JsonResult
<
Object
>
getUserPages
(
Integer
pageNum
,
Integer
pageSize
){
JsonResult
<
Object
>
result
=
new
JsonResult
<
Object
>();
Page
<
User
>
page
=
new
Page
<
User
>(
pageNum
,
pageSize
);
QueryWrapper
<
User
>
queryWrapper
=
new
QueryWrapper
<
User
>();
//分页数据
try
{
try
{
int
reg
=
orderServiceImpl
.
updateByPrimaryKeySelective
(
order
);
//List<User> list=userServiceImpl.list(queryWrapper);
if
(
reg
>
0
)
{
IPage
<
User
>
pageInfo
=
userServiceImpl
.
page
(
page
,
queryWrapper
);
result
.
setCode
(
1
);
result
.
setType
(
"success"
);
result
.
setMessage
(
"成功"
);
result
.
setMessage
(
"成功"
);
result
.
setData
(
order
);
result
.
setData
(
pageInfo
);
}
else
{
logger
.
error
(
"修改订单失败ID:"
+
order
.
toString
());
result
.
setCode
(-
1
);
result
.
setMessage
(
"执行错误,请稍后重试"
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"修改订单执行异常:"
+
e
.
getMessage
());
logger
.
error
(
"分页查询用户执行异常:"
+
e
.
getMessage
());
result
.
setCode
(-
1
);
result
=
new
JsonResult
<
Object
>(
e
);
result
.
setMessage
(
"执行异常,请稍后重试"
);
}
}
return
result
;
return
result
;
}
}
}
```
看到这里,大家应该能看出,这个代码生成只适合一些特定的项目,不过确实为了那些喜欢lombok,swagger的猿们减少了很多不必要的工作。
一些朋友在问我JsonResult类:
```
java
import
java.io.Serializable
;
import
java.net.ConnectException
;
import
java.sql.SQLException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* Copyright: Copyright (c) 2019
*
* <p>说明: 用户服务层</P>
* @version: V1.0
* @author: BianPeng
*
* Modification History:
* Date Author Version Description
*---------------------------------------------------------*
* 2019/4/9 flying-cattle V1.0 initialize
*/
public
class
JsonResult
<
T
>
implements
Serializable
{
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
private
static
final
long
serialVersionUID
=
1071681926787951549L
;
/**
/**
* @explain 获取匹配订单
* <p>返回状态</p>
* @param 对象参数:order
* @return List<Order>
* @author BianP
* @time 2018年7月5日
*/
*/
@ApiOperation
(
value
=
"条件查询订单"
,
notes
=
"条件查询[order],作者:BianP"
)
private
Boolean
isTrue
=
true
;
@PostMapping
(
"/queryOrderList"
)
/**
public
JsonResult
queryOrderList
(
Order
order
){
*<p> 状态码</p>
JsonResult
result
=
new
JsonResult
();
*/
try
{
private
String
code
;
List
<
Order
>
list
=
orderServiceImpl
.
queryOrderList
(
order
);
/**
result
.
setCode
(
1
);
* <p>业务码</p>
result
.
setMessage
(
"成功"
);
*/
result
.
setData
(
list
);
private
String
type
;
}
catch
(
Exception
e
)
{
/**
logger
.
error
(
"获取订单执行异常:"
+
e
.
getMessage
());
*<p> 状态说明</p>
result
.
setCode
(-
1
);
*/
result
.
setMessage
(
"执行异常,请稍后重试"
);
private
String
message
;
/**
* <p>返回数据</p>
*/
private
T
data
;
public
Boolean
getTrue
()
{
return
isTrue
;
}
}
return
result
;
public
void
setTrue
(
Boolean
aTrue
)
{
isTrue
=
aTrue
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
T
getData
()
{
return
data
;
}
public
void
setData
(
T
data
)
{
this
.
data
=
data
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
/**
/**
* @explain 分页条件查询订单
* <p>返回成功</p>
* @param 对象参数:AppPage<Order>
* @param type 业务码
* @return PageInfo<Order>
* @param message 错误说明
* @author BianP
* @param data 数据
* @time 2018年7月5日
*/
*/
@GetMapping
(
"/getPageOrder"
)
public
JsonResult
(
String
type
,
String
message
,
T
data
)
{
@ApiOperation
(
value
=
"分页查询"
,
notes
=
"分页查询返回对象[PageInfo<Order>],作者:边鹏"
)
this
.
isTrue
=
true
;
@ApiImplicitParams
({
this
.
code
=
"0000"
;
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageNum"
,
value
=
"当前页"
,
required
=
true
,
dataType
=
"int"
),
this
.
type
=
type
;
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"pageSize"
,
value
=
"页行数"
,
required
=
true
,
dataType
=
"int"
)
this
.
message
=
message
;
})
this
.
data
=
data
;
public
JsonResult
getOrderBySearch
(
Integer
pageNum
,
Integer
pageSize
){
}
JsonResult
result
=
new
JsonResult
();
public
JsonResult
()
{
AppPage
<
Order
>
page
=
new
AppPage
<
Order
>();
this
.
isTrue
=
true
;
page
.
setPageNum
(
pageNum
);
this
.
code
=
"0000"
;
page
.
setPageSize
(
pageSize
);
}
//其他参数
public
JsonResult
(
Throwable
throwable
)
{
Order
order
=
new
Order
();
logger
.
error
(
throwable
+
"tt"
);
page
.
setParam
(
order
);
this
.
isTrue
=
false
;
//分页数据
if
(
throwable
instanceof
NullPointerException
){
try
{
this
.
code
=
"1001"
;
PageInfo
<
Order
>
pageInfo
=
orderServiceImpl
.
getOrderBySearch
(
page
);
this
.
message
=
"空指针:"
+
throwable
;
result
.
setCode
(
1
);
}
else
if
(
throwable
instanceof
ClassCastException
){
result
.
setMessage
(
"成功"
);
this
.
code
=
"1002"
;
result
.
setData
(
pageInfo
);
this
.
message
=
"类型强制转换异常:"
+
throwable
;
}
catch
(
Exception
e
)
{
}
else
if
(
throwable
instanceof
ConnectException
){
logger
.
error
(
"分页查询订单执行异常:"
+
e
.
getMessage
());
this
.
code
=
"1003"
;
result
.
setCode
(-
1
);
this
.
message
=
"链接失败:"
+
throwable
;
result
.
setMessage
(
"执行异常,请稍后重试"
);
}
else
if
(
throwable
instanceof
IllegalArgumentException
){
this
.
code
=
"1004"
;
this
.
message
=
"传递非法参数异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
NumberFormatException
){
this
.
code
=
"1005"
;
this
.
message
=
"数字格式异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
IndexOutOfBoundsException
){
this
.
code
=
"1006"
;
this
.
message
=
"下标越界异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
SecurityException
){
this
.
code
=
"1007"
;
this
.
message
=
"安全异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
SQLException
){
this
.
code
=
"1008"
;
this
.
message
=
"数据库异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
ArithmeticException
){
this
.
code
=
"1009"
;
this
.
message
=
"算术运算异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
RuntimeException
){
this
.
code
=
"1010"
;
this
.
message
=
"运行时异常:"
+
throwable
;
}
else
if
(
throwable
instanceof
Exception
){
logger
.
error
(
"未知异常:"
+
throwable
);
this
.
code
=
"9999"
;
this
.
message
=
"未知异常"
+
throwable
;
}
}
return
result
;
}
}
}
}
```
```
看到这里,大家应该能看出,这个代码生成只适合一些特定的项目,首先是springboot,其次是使用的mybatis和pagehelper,并使用了swagger与lombok。
src/main/resources/freemarker/ftl/dao.ftl
View file @
aff1c1ba
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*/
*/
package
${
daoUrl
};
package
${
daoUrl
};
import
java
.
util
.
List
;
import
com
.
baomidou
.
mybatisplus
.
core
.
mapper
.
BaseMapper
;
import
com
.
baomidou
.
mybatisplus
.
core
.
mapper
.
BaseMapper
;
import
org
.
apache
.
ibatis
.
annotations
.
Mapper
;
import
org
.
apache
.
ibatis
.
annotations
.
Mapper
;
import
${
entityUrl
}.${
entityName
};
import
${
entityUrl
}.${
entityName
};
...
...
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