Fix existence query bug

pull/146/head
johnniang 2019-04-28 20:49:37 +08:00
parent b4ec2b2318
commit 2933e0297f
1 changed files with 2 additions and 2 deletions

View File

@ -108,9 +108,9 @@ public interface BasePostRepository<POST extends BasePost> extends BaseRepositor
*/ */
long countByStatus(@NonNull PostStatus status); long countByStatus(@NonNull PostStatus status);
boolean countByUrl(@NonNull String title); boolean existsByUrl(@NonNull String title);
boolean countByIdNotAndUrl(@NonNull Integer id, @NonNull String title); boolean existsByIdNotAndUrl(@NonNull Integer id, @NonNull String title);
/** /**
* Get post by url * Get post by url