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