Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新文档 MyLogicSqlInjector 部分代码 #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions mybatis-plus-sample-deluxe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ public class MyLogicSqlInjector extends DefaultSqlInjector {
* @return
*/
@Override
public List<AbstractMethod> getMethodList() {
List<AbstractMethod> methodList = super.getMethodList();
methodList.add(new DeleteAll());
methodList.add(new MyInsertAll());
methodList.add(new MysqlInsertAllBatch());
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
methodList.add(new DeleteAll("deleteAll"));
methodList.add(new MyInsertAll("myInsertAll"));
methodList.add(new MysqlInsertAllBatch("mysqlInsertAllBatch"));
methodList.add(new SelectById());
return methodList;
}
}
Expand Down Expand Up @@ -74,4 +75,4 @@ insert into user(id, name, age) values (1, "a", 17), (2,"b", 18)
> 坑点:

- 在演示自定义批量和自动填充功能时,需要在mapper方法的参数上定义@Param(),
- 而mp默认仅支持 list, collection, array 3个命名,不然无法自动填充
- 而mp默认仅支持 list, collection, array 3个命名,不然无法自动填充