!352 update docs/zh/base/batch.md.

Merge pull request !352 from 数据小王子/N/A
This commit is contained in:
Michael Yang 2023-09-27 09:15:50 +00:00 committed by Gitee
commit af23bad0b4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -80,7 +80,7 @@ List<Account> accounts = ....
Db.executeBatch(accounts, 1000, AccountMapper.class
, (mapper, account) -> {
// ↑↑↑↑↑ 以上的这个 mapper未被使用
UpdateChina.of(account)
UpdateChain.of(account)
.set(Account::getUserName, "张三")
.update();
});
@ -94,7 +94,7 @@ List<Account> accounts = ....
Db.executeBatch(accounts, 1000, AccountMapper.class
, (mapper, account) -> {
UpdateChina.of(mapper) //使用 mapper 参数,才能起到批量执行的效果
UpdateChain.of(mapper) //使用 mapper 参数,才能起到批量执行的效果
.set(Account::getUserName, "张三")
.update();
});