0.10.0 增加repository批量添加接口

This commit is contained in:
2021-04-08 00:02:32 +08:00
parent c047f7f5f8
commit 6c5b84fe5d
3 changed files with 12 additions and 1 deletions

View File

@@ -35,6 +35,9 @@ open class MongoRepository(private var repo: MongoTemplate) : IRepository {
this.repo.save(obj)
}
override fun <TAggregateRoot : IAggregateRoot<TKey>, TKey> add(obj: List<TAggregateRoot>, clazz: Class<TAggregateRoot>) {
this.repo.insert(obj, clazz)
}
override fun <TAggregateRoot> count(params: Map<String, Any>?, clazz: Class<TAggregateRoot>): Int {
val query = Query()