Skip to content

Commit 145afed

Browse files
committed
User order by
1 parent 29592ac commit 145afed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/github/throyer/common/springboot/domain/services/user/FindUserService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ ur.user_id, string_agg(r.initials, ',') roles
5252
"user" u
5353
left join user_roles as urs on urs.user_id = u.id
5454
where u.deleted_at is null
55+
order by u.created_at desc
5556
""";
5657

5758
var query = manager.createNativeQuery(sql, Tuple.class);
@@ -60,7 +61,7 @@ ur.user_id, string_agg(r.initials, ',') roles
6061
count(id)
6162
from
6263
"user"
63-
where deleted_at is null
64+
where deleted_at is null
6465
""").getSingleResult()).longValue();
6566

6667
var pageable = Pagination.of(page, size);

0 commit comments

Comments
 (0)