Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a65a50

Browse files
committed
修改方法名错误insertUseGeneratedKeys
1 parent 3e93f63 commit 2a65a50

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/java/com/github/abel533/mapper/special/InsertUseGeneratedKeysMapper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public interface InsertUseGeneratedKeysMapper<T> {
4444
*/
4545
@Options(useGeneratedKeys = true, keyProperty = "id")
4646
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
47-
int InsertUseGeneratedKeysMapper(T record);
47+
int insertUseGeneratedKeys(T record);
4848

4949
/**
5050
* ======如果主键不是id怎么用?==========
@@ -53,7 +53,7 @@ public interface InsertUseGeneratedKeysMapper<T> {
5353
public interface InsertUidMapper<T> {
5454
@Options(useGeneratedKeys = true, keyProperty = "id")
5555
@InsertProvider(type = SpecialProvider.class, method = "dynamicSQL")
56-
int InsertUseGeneratedKeysMapper(T record);
56+
int insertUseGeneratedKeys(T record);
5757
}
5858
* 只要修改keyProperty = "uid"就可以
5959
*

src/main/java/com/github/abel533/provider/SpecialProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public String insertList(MappedStatement ms) {
8282
*
8383
* @param ms
8484
*/
85-
public String InsertUseGeneratedKeysMapper(MappedStatement ms) {
85+
public String insertUseGeneratedKeys(MappedStatement ms) {
8686
final Class<?> entityClass = getSelectReturnType(ms);
8787
EntityHelper.EntityTable table = EntityHelper.getEntityTable(entityClass);
8888
//开始拼sql

wiki/mapper3/5.Mappers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ Mapper3接口有两种形式,一种是提供了一个方法的接口。还有
127127
说明:批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等,另外该接口限制实体包含`id`属性并且必须为自增列<br><br>
128128

129129
接口:`InsertUseGeneratedKeysMapper<T>`<br>
130-
方法:`int InsertUseGeneratedKeysMapper(T record);`<br>
130+
方法:`int insertUseGeneratedKeys(T record);`<br>
131131
说明:插入数据,限制为实体包含`id`属性并且必须为自增列,实体配置的主键策略无效<br><br>
132132

133133
##MySQL专用
134134

135135
接口:`MySqlMapper<T>`<br>
136136
继承方法:`int insertList(List<T> recordList);`<br>
137-
继承方法:`int InsertUseGeneratedKeysMapper(T record);`<br>
137+
继承方法:`int insertUseGeneratedKeys(T record);`<br>
138138
说明:该接口不包含方法,继承了special中的`InsertListMapper<T>``InsertUseGeneratedKeysMapper<T>`<br><br>
139139

140140
##Mapper<T>接口

0 commit comments

Comments
 (0)