|
12 | 12 | import static com.yello.server.global.common.SuccessCode.READ_USER_DETAIL_ADMIN_SUCCESS;
|
13 | 13 | import static com.yello.server.global.common.SuccessCode.UPDATE_USER_DETAIL_ADMIN_SUCCESS;
|
14 | 14 | import static com.yello.server.global.common.factory.PaginationFactory.createPageable;
|
| 15 | +import static com.yello.server.global.common.factory.PaginationFactory.createPageableByNameSortDescLimitTen; |
15 | 16 | import static com.yello.server.global.common.factory.PaginationFactory.createPageableLimitTen;
|
16 | 17 |
|
17 | 18 | import com.yello.server.domain.admin.dto.request.AdminLoginRequest;
|
@@ -61,9 +62,10 @@ public BaseResponse<AdminUserResponse> getUserAdmin(@AccessTokenUser User user,
|
61 | 62 | @RequestParam Integer page,
|
62 | 63 | @Nullable @RequestParam String field,
|
63 | 64 | @Nullable @RequestParam String value) {
|
64 |
| - val data = (field == null && value == null) |
65 |
| - ? adminService.findUser(user.getId(), createPageableLimitTen(page)) |
66 |
| - : adminService.findUserContaining(user.getId(), createPageableLimitTen(page), |
| 65 | + val data = (field==null && value==null) |
| 66 | + ? adminService.findUser(user.getId(), createPageableByNameSortDescLimitTen(page)) |
| 67 | + : adminService.findUserContaining(user.getId(), |
| 68 | + createPageableByNameSortDescLimitTen(page), |
67 | 69 | field, value);
|
68 | 70 | return BaseResponse.success(READ_USER_ADMIN_SUCCESS, data);
|
69 | 71 | }
|
@@ -92,7 +94,7 @@ public BaseResponse deleteUser(@AccessTokenUser User user, @RequestParam Long us
|
92 | 94 | public BaseResponse<AdminCooldownResponse> getCooldownAdmin(@AccessTokenUser User user,
|
93 | 95 | @RequestParam Integer page,
|
94 | 96 | @Nullable @RequestParam String yelloId) {
|
95 |
| - val data = yelloId == null |
| 97 | + val data = yelloId==null |
96 | 98 | ? adminService.findCooldown(user.getId(), createPageableLimitTen(page))
|
97 | 99 | : adminService.findCooldownContaining(user.getId(), createPageableLimitTen(page),
|
98 | 100 | yelloId);
|
|
0 commit comments