1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-07-24 08:31:45 +08:00

Merge pull request #970 from CollectBugs/feature/I8F61B

#I8F61B 联系人查询,类别字段新增判空处理
This commit is contained in:
lecjy 2023-11-16 08:37:27 +08:00 committed by GitHub
commit 004c12bb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ public interface ContactsRepository extends JpaRepository<Contacts, String> {
* @param pageRequest
* @return
*/
@Query("select c from Contacts c where c.organ IN :organs and c.ckind = :ckind AND c.shares = 'all' AND c.datastatus = false")
@Query("select c from Contacts c where c.organ IN :organs and (:ckind IS NULL OR c.ckind = :ckind) AND c.shares = 'all' AND c.datastatus = false")
Page<Contacts> findByOrganInAndCkindAndSharesAllAndDatastatusFalse(@Param("organs") Collection<String> organs, @Param("ckind") String ckind, Pageable pageRequest);
Page<Contacts> findByDatastatus(boolean b, Pageable pageRequest);