Skip to content

Commit 59975cd

Browse files
author
hewei
committed
V1.0.7
1 parent b83cc93 commit 59975cd

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,21 @@
77
* [查询单条数据插件(SelectOneByExamplePlugin)](#1-查询单条数据插件)
88
* [MySQL分页插件(LimitPlugin)](#2-mysql分页插件)
99
* [数据Model链式构建插件(ModelBuilderPlugin)](#3-数据model链式构建插件)
10-
* [Example Criteria 增强插件(ExampleEnhancedPlugin(CriteriaBuilderPlugin这个是老版本叫法,已经弃用)](#4-example-增强插件exampleandiforderby)
10+
* [Example Criteria 增强插件(ExampleEnhancedPlugin)](#4-example-增强插件exampleandiforderby)
1111
* [Example 目标包修改插件(ExampleTargetPlugin)](#5-example-目标包修改插件)
1212
* [批量插入插件(BatchInsertPlugin)](#6-批量插入插件)
1313
* [逻辑删除插件(LogicalDeletePlugin)](#7-逻辑删除插件)
1414
* [数据Model属性对应Column获取插件(ModelColumnPlugin)](#8-数据model属性对应column获取插件)
1515
* [存在即更新插件(UpsertPlugin)](#9-存在即更新插件)
16-
* [Selective选择插入更新增强插件(SelectiveEnhancedPlugin(1.0.7-SNAPSHOT))](#10-selective选择插入更新增强插件107-snapshot)
16+
* [Selective选择插入更新增强插件(SelectiveEnhancedPlugin](#10-selective选择插入更新增强插件)
1717

1818
---------------------------------------
1919
Maven引用:
2020
```xml
2121
<dependency>
2222
<groupId>com.itfsw</groupId>
2323
<artifactId>mybatis-generator-plugin</artifactId>
24-
<!-- 稳定版本 -->
25-
<version>1.0.6</version>
26-
<!-- 快照版本(最新提交到中央库,增加了部分功能,欢迎测试反馈) -->
27-
<version>1.0.7-SNAPSHOT</version>
24+
<version>1.0.7</version>
2825
</dependency>
2926
```
3027
---------------------------------------
@@ -299,7 +296,7 @@ public class Test {
299296
因为很多实际项目数据都不允许物理删除,多采用逻辑删除,所以单独为逻辑删除做了一个插件,方便使用。
300297
- 增加logicalDeleteByExample和logicalDeleteByPrimaryKey方法;
301298
- 查询构造工具中增加逻辑删除条件andDeleted(boolean);
302-
- 增加逻辑删除常量DEL_FLAG_OFF(已删除)、DEL_FLAG_ON(未删除)(1.0.7-SNAPSHOT)
299+
- 增加逻辑删除常量DEL_FLAG_OFF(已删除)、DEL_FLAG_ON(未删除);
303300

304301
插件:
305302
```xml
@@ -421,7 +418,7 @@ public class Test {
421418
```
422419
### 9. 存在即更新插件
423420
1. 使用MySQL的[“insert ... on duplicate key update”](https://dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate.html)实现存在即更新操作,简化数据入库操作([[issues#2]](https://github.com/itfsw/mybatis-generator-plugin/issues/2))。
424-
2. 在开启allowMultiQueries=true(默认不会开启)情况下支持upsertByExample,upsertByExampleSelective操作,但强力建议不要使用(需保证团队没有使用statement提交sql,否则会存在sql注入风险)(1.0.7-SNAPSHOT)([[issues#2]](https://github.com/itfsw/mybatis-generator-plugin/issues/2))。
421+
2. 在开启allowMultiQueries=true(默认不会开启)情况下支持upsertByExample,upsertByExampleSelective操作,但强力建议不要使用(需保证团队没有使用statement提交sql,否则会存在sql注入风险)([[issues#2]](https://github.com/itfsw/mybatis-generator-plugin/issues/2))。
425422

426423
插件:
427424
```xml
@@ -430,7 +427,6 @@ public class Test {
430427
<!--
431428
支持upsertByExample,upsertByExampleSelective操作
432429
!需开启allowMultiQueries=true多条sql提交操作,所以不建议使用!
433-
! 目前在1.0.7-SNAPSHOT支持,有需要的可以下载试用
434430
-->
435431
<property name="allowMultiQueries" value="true"/>
436432
</plugin>
@@ -485,7 +481,7 @@ public class Test {
485481
}
486482
}
487483
```
488-
### 10. Selective选择插入更新增强插件(1.0.7-SNAPSHOT)
484+
### 10. Selective选择插入更新增强插件
489485
项目中往往需要指定某些字段进行插入或者更新,或者把某些字段进行设置null处理,这种情况下原生xxxSelective方法往往不能达到需求,因为它的判断条件是对象字段是否为null,这种情况下可使用该插件对xxxSelective方法进行增强。
490486
WAREN:配置插件时请把插件配置在所有插件末尾最后执行,这样才能把上面提供的某些插件的Selective方法也同时增强!
491487

0 commit comments

Comments
 (0)