mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
!352 update docs/zh/base/batch.md.
Merge pull request !352 from 数据小王子/N/A
This commit is contained in:
commit
af23bad0b4
@ -80,7 +80,7 @@ List<Account> accounts = ....
|
|||||||
Db.executeBatch(accounts, 1000, AccountMapper.class
|
Db.executeBatch(accounts, 1000, AccountMapper.class
|
||||||
, (mapper, account) -> {
|
, (mapper, account) -> {
|
||||||
// ↑↑↑↑↑ 以上的这个 mapper,未被使用
|
// ↑↑↑↑↑ 以上的这个 mapper,未被使用
|
||||||
UpdateChina.of(account)
|
UpdateChain.of(account)
|
||||||
.set(Account::getUserName, "张三")
|
.set(Account::getUserName, "张三")
|
||||||
.update();
|
.update();
|
||||||
});
|
});
|
||||||
@ -94,7 +94,7 @@ List<Account> accounts = ....
|
|||||||
Db.executeBatch(accounts, 1000, AccountMapper.class
|
Db.executeBatch(accounts, 1000, AccountMapper.class
|
||||||
, (mapper, account) -> {
|
, (mapper, account) -> {
|
||||||
|
|
||||||
UpdateChina.of(mapper) //使用 mapper 参数,才能起到批量执行的效果
|
UpdateChain.of(mapper) //使用 mapper 参数,才能起到批量执行的效果
|
||||||
.set(Account::getUserName, "张三")
|
.set(Account::getUserName, "张三")
|
||||||
.update();
|
.update();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user