将 find 方法的返回值改为 Optional<T>。
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package xyz.zhouxy.plusone.system.domain.model.account;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
|
||||
import xyz.zhouxy.plusone.domain.IRepository;
|
||||
|
||||
@@ -14,11 +15,11 @@ public interface AccountRepository extends IRepository<Account, Long> {
|
||||
|
||||
Collection<Account> findByRoleId(Long roleId);
|
||||
|
||||
Account findByEmail(Email email);
|
||||
Optional<Account> findByEmail(Email email);
|
||||
|
||||
Account findByMobilePhone(MobilePhone mobilePhone);
|
||||
Optional<Account> findByMobilePhone(MobilePhone mobilePhone);
|
||||
|
||||
Account findByUsername(Username username);
|
||||
Optional<Account> findByUsername(Username username);
|
||||
|
||||
boolean existsUsername(Username username);
|
||||
|
||||
|
Reference in New Issue
Block a user