0.11.0 增加修改DateTime类型方法;修改Repo get方法可以为空

This commit is contained in:
2021-05-13 19:06:39 +08:00
parent 274f862515
commit 5fb26fc7e1
5 changed files with 176 additions and 38 deletions

View File

@@ -20,8 +20,8 @@ open class MongoRepository(private var repo: MongoTemplate) : IRepository {
override fun <TAggregateRoot : IAggregateRoot<TKey>, TKey> get(
id: TKey,
clazz: Class<TAggregateRoot>
): TAggregateRoot {
return this.repo.findOne(whereId(id), clazz) as TAggregateRoot
): TAggregateRoot? {
return this.repo.findOne(whereId(id), clazz)
}
override fun <TAggregateRoot : IAggregateRoot<TKey>, TKey> update(