|
|
|
@ -51,7 +51,7 @@ public interface CustomerRepository extends JpaRepository<CustomerEntity, UUID>, |
|
|
|
@Query(value = "SELECT c.* FROM customer c " + |
|
|
|
"INNER JOIN (SELECT tenant_id, title FROM customer GROUP BY tenant_id, title HAVING COUNT(title) > 1) dc " + |
|
|
|
"ON c.tenant_id = dc.tenant_id AND c.title = dc.title " + |
|
|
|
"ORDER BY c.tenant_id, c.title, c.created_time", |
|
|
|
"ORDER BY c.tenant_id, c.title, c.id", |
|
|
|
nativeQuery = true) |
|
|
|
Page<CustomerEntity> findCustomersWithTheSameTitle(Pageable pageable); |
|
|
|
|
|
|
|
|