mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
test: 测试 saveOrUpdateBatch 方法。
This commit is contained in:
parent
233b5f5052
commit
d7535294ef
@ -77,10 +77,7 @@ public class ArticleTester {
|
|||||||
articles.add(article);
|
articles.add(article);
|
||||||
}
|
}
|
||||||
|
|
||||||
Db.executeBatch(articles, ArticleMapper.class, (mapper, article) -> {
|
Db.executeBatch(articles, ArticleMapper.class, ArticleMapper::insertOrUpdateSelective);
|
||||||
System.out.println("article: " + article);
|
|
||||||
mapper.insertSelective(article);
|
|
||||||
});
|
|
||||||
|
|
||||||
articleMapper.selectAll().forEach(System.out::println);
|
articleMapper.selectAll().forEach(System.out::println);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user