From aae7f5c22d71e4d0eacd6eabdbb0ccee4f83992c Mon Sep 17 00:00:00 2001 From: jj Date: Fri, 3 Jan 2025 01:57:47 +0900 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20=EC=9D=B4=EB=A6=84=20=EC=98=A4?= =?UTF-8?q?=EB=A6=84=EC=B0=A8=EC=88=9C=EC=9C=BC=EB=A1=9C=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EC=9D=98=20status=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?=EC=88=9C=EC=84=9C=EB=8C=80=EB=A1=9C=20=EB=A9=A4=EB=B2=84=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usecase/UserManageUseCaseImpl.java | 16 +++++++++++++++- .../user/domain/repository/UserRepository.java | 1 + .../user/domain/service/UserGetService.java | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java index b3830914..32ed0907 100644 --- a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java +++ b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java @@ -6,6 +6,7 @@ import leets.weeth.domain.schedule.domain.service.MeetingGetService; import leets.weeth.domain.user.application.mapper.UserMapper; import leets.weeth.domain.user.domain.entity.User; +import leets.weeth.domain.user.domain.entity.enums.Status; import leets.weeth.domain.user.domain.service.UserDeleteService; import leets.weeth.domain.user.domain.service.UserGetService; import leets.weeth.domain.user.domain.service.UserUpdateService; @@ -14,9 +15,13 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; +import java.util.Comparator; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import static leets.weeth.domain.user.application.dto.response.UserResponseDto.AdminResponse; +import static leets.weeth.domain.user.domain.entity.enums.Status.*; @Service @RequiredArgsConstructor @@ -35,9 +40,18 @@ public class UserManageUseCaseImpl implements UserManageUseCase { @Override public List findAllByAdmin() { + // 우선순위 지정 + Map statusPriority = Map.of( + ACTIVE, 1, + WAITING, 2, + LEFT, 3, + BANNED, 4 + ); + return userGetService.findAll().stream() + .sorted(Comparator.comparingInt(user -> statusPriority.getOrDefault(user.getStatus(), Integer.MAX_VALUE))) .map(mapper::toAdminResponse) - .toList(); + .collect(Collectors.toList()); } @Override diff --git a/src/main/java/leets/weeth/domain/user/domain/repository/UserRepository.java b/src/main/java/leets/weeth/domain/user/domain/repository/UserRepository.java index f713d0a6..5dcd42ad 100644 --- a/src/main/java/leets/weeth/domain/user/domain/repository/UserRepository.java +++ b/src/main/java/leets/weeth/domain/user/domain/repository/UserRepository.java @@ -20,4 +20,5 @@ public interface UserRepository extends JpaRepository { boolean existsByTelAndIdIsNot(String tel, Long id); List findAllByStatusOrderByName(Status status); + List findAllByOrderByNameAsc(); } diff --git a/src/main/java/leets/weeth/domain/user/domain/service/UserGetService.java b/src/main/java/leets/weeth/domain/user/domain/service/UserGetService.java index 486dc559..0a409892 100644 --- a/src/main/java/leets/weeth/domain/user/domain/service/UserGetService.java +++ b/src/main/java/leets/weeth/domain/user/domain/service/UserGetService.java @@ -39,7 +39,7 @@ public List findAllByStatus(Status status) { } public List findAll() { - return userRepository.findAll(); + return userRepository.findAllByOrderByNameAsc(); } public boolean validateStudentId(String studentId) { From b5c5d242abfdea15550baaa5220a0ee3acfa6e5b Mon Sep 17 00:00:00 2001 From: jj Date: Sat, 4 Jan 2025 17:55:13 +0900 Subject: [PATCH 2/9] =?UTF-8?q?refactor:=20=EC=96=B4=EB=93=9C=EB=AF=BC?= =?UTF-8?q?=EC=9A=A9=20=ED=9A=8C=EC=9B=90=20=EC=A1=B0=ED=9A=8C=EB=A5=BC=20?= =?UTF-8?q?=EB=A7=B5=ED=95=91=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20/?= =?UTF-8?q?=20=EC=B6=94=ED=9B=84=20=EA=B8=B0=EC=88=98=20=EB=B6=84=EB=A6=AC?= =?UTF-8?q?=20=ED=9B=84=20=EC=9E=91=EC=97=85=20=EC=98=88=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/presentation/UserAdminController.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java b/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java index cf7e0364..2a4f3fa8 100644 --- a/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java +++ b/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java @@ -8,7 +8,9 @@ import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.List; +import java.util.Map; import static leets.weeth.domain.user.application.dto.response.UserResponseDto.AdminResponse; import static leets.weeth.domain.user.presentation.ResponseMessage.*; @@ -23,8 +25,13 @@ public class UserAdminController { @GetMapping("/all") @Operation(summary="어드민용 회원 조회") - public CommonResponse> findAll() { - return CommonResponse.createSuccess(USER_FIND_ALL_SUCCESS.getMessage(), userManageUseCase.findAllByAdmin()); + public CommonResponse>> findAll() { + // to do : 추후 기수 분리 후 작업 예정 + List usersByCardinal = new ArrayList<>(); + List usersByName = userManageUseCase.findAllByAdmin(); + + return CommonResponse.createSuccess(USER_FIND_ALL_SUCCESS.getMessage(), Map.of(0, usersByCardinal, + 1, usersByName)); } @PatchMapping From d73d11839d35abb5174debe66652dbd61f385683 Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 21:52:50 +0900 Subject: [PATCH 3/9] =?UTF-8?q?feat:=20=EC=98=AC=EB=B0=94=EB=A5=B4?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EC=9D=80=20=EC=9C=A0=EC=A0=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=88=9C=EC=84=9C,=20status=EC=9D=98=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/exception/InvalidUserOrderException.java | 7 +++++++ .../application/exception/StatusNotFoundException.java | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/main/java/leets/weeth/domain/user/application/exception/InvalidUserOrderException.java create mode 100644 src/main/java/leets/weeth/domain/user/application/exception/StatusNotFoundException.java diff --git a/src/main/java/leets/weeth/domain/user/application/exception/InvalidUserOrderException.java b/src/main/java/leets/weeth/domain/user/application/exception/InvalidUserOrderException.java new file mode 100644 index 00000000..4872cc21 --- /dev/null +++ b/src/main/java/leets/weeth/domain/user/application/exception/InvalidUserOrderException.java @@ -0,0 +1,7 @@ +package leets.weeth.domain.user.application.exception; + +import leets.weeth.global.common.exception.BusinessLogicException; + +public class InvalidUserOrderException extends BusinessLogicException { + public InvalidUserOrderException() {super(400, "올바른 유저 조회 순서가 아닙니다.");} +} diff --git a/src/main/java/leets/weeth/domain/user/application/exception/StatusNotFoundException.java b/src/main/java/leets/weeth/domain/user/application/exception/StatusNotFoundException.java new file mode 100644 index 00000000..3686e3ab --- /dev/null +++ b/src/main/java/leets/weeth/domain/user/application/exception/StatusNotFoundException.java @@ -0,0 +1,9 @@ +package leets.weeth.domain.user.application.exception; + +import leets.weeth.global.common.exception.BusinessLogicException; + +public class StatusNotFoundException extends BusinessLogicException { + public StatusNotFoundException() { + super(400, "존재하지 않는 status 입니다."); + } +} From 7df8bdcca2ece5ea467594cc90df605e8974b36c Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 21:53:51 +0900 Subject: [PATCH 4/9] =?UTF-8?q?feat:=20status=EC=9D=98=20=EC=9A=B0?= =?UTF-8?q?=EC=84=A0=EC=88=9C=EC=9C=84=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/entity/enums/StatusPriority.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/leets/weeth/domain/user/domain/entity/enums/StatusPriority.java diff --git a/src/main/java/leets/weeth/domain/user/domain/entity/enums/StatusPriority.java b/src/main/java/leets/weeth/domain/user/domain/entity/enums/StatusPriority.java new file mode 100644 index 00000000..4c756207 --- /dev/null +++ b/src/main/java/leets/weeth/domain/user/domain/entity/enums/StatusPriority.java @@ -0,0 +1,25 @@ +package leets.weeth.domain.user.domain.entity.enums; + +import leets.weeth.domain.user.application.exception.StatusNotFoundException; +import lombok.Getter; + +@Getter +public enum StatusPriority { + ACTIVE(1), + WAITING(2), + LEFT(3), + BANNED(4); + + private final int priority; + + StatusPriority(int priority) { + this.priority = priority; + } + + public static StatusPriority fromStatus(Status status) { + if (status == null) { + throw new StatusNotFoundException(); + } + return StatusPriority.valueOf(status.name()); + } +} From dead581a8a63b34f11a7e66534b20458cd89bf32 Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 21:54:21 +0900 Subject: [PATCH 5/9] =?UTF-8?q?feat:=20ENUM=20=ED=83=80=EC=9E=85=EC=9D=B8?= =?UTF-8?q?=20UsersOrderBy=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weeth/domain/user/domain/entity/enums/UsersOrderBy.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/java/leets/weeth/domain/user/domain/entity/enums/UsersOrderBy.java diff --git a/src/main/java/leets/weeth/domain/user/domain/entity/enums/UsersOrderBy.java b/src/main/java/leets/weeth/domain/user/domain/entity/enums/UsersOrderBy.java new file mode 100644 index 00000000..feb8bb40 --- /dev/null +++ b/src/main/java/leets/weeth/domain/user/domain/entity/enums/UsersOrderBy.java @@ -0,0 +1,6 @@ +package leets.weeth.domain.user.domain.entity.enums; + +public enum UsersOrderBy { + NAME_ASCENDING, // 이름순 정렬 + CARDINAL_DESCENDING; // 기수 기준으로 내림차순 정렬 +} From 80edf05c6de27bae92c712ab6bc7f31e83e0e50f Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 21:55:47 +0900 Subject: [PATCH 6/9] =?UTF-8?q?refactor:=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=EB=A5=BC=20=EB=B0=9B=EC=95=84=20=EC=96=B4=EB=93=9C?= =?UTF-8?q?=EB=AF=BC=EC=9A=A9=20=ED=9A=8C=EC=9B=90=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/UserAdminController.java | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java b/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java index 1952cea4..104c1ed3 100644 --- a/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java +++ b/src/main/java/leets/weeth/domain/user/presentation/UserAdminController.java @@ -3,14 +3,12 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import leets.weeth.domain.user.application.usecase.UserManageUseCase; -import leets.weeth.domain.user.application.usecase.UserUseCase; +import leets.weeth.domain.user.domain.entity.enums.UsersOrderBy; import leets.weeth.global.common.response.CommonResponse; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; import java.util.List; -import java.util.Map; import static leets.weeth.domain.user.application.dto.response.UserResponseDto.AdminResponse; import static leets.weeth.domain.user.presentation.ResponseMessage.*; @@ -25,45 +23,40 @@ public class UserAdminController { @GetMapping("/all") @Operation(summary = "어드민용 회원 조회") - public CommonResponse>> findAll() { - // to do : 추후 기수 분리 후 작업 예정 - List usersByCardinal = new ArrayList<>(); - List usersByName = userManageUseCase.findAllByAdmin(); - - return CommonResponse.createSuccess(USER_FIND_ALL_SUCCESS.getMessage(), Map.of(0, usersByCardinal, - 1, usersByName)); + public CommonResponse> findAll(@RequestParam UsersOrderBy orderBy) { + return CommonResponse.createSuccess(USER_FIND_ALL_SUCCESS.getMessage(), userManageUseCase.findAllByAdmin(orderBy)); } @PatchMapping - @Operation(summary="가입 신청 승인") + @Operation(summary = "가입 신청 승인") public CommonResponse accept(@RequestParam Long userId) { userManageUseCase.accept(userId); return CommonResponse.createSuccess(USER_ACCEPT_SUCCESS.getMessage()); } @DeleteMapping - @Operation(summary="유저 추방") + @Operation(summary = "유저 추방") public CommonResponse ban(@RequestParam Long userId) { userManageUseCase.ban(userId); return CommonResponse.createSuccess(USER_BAN_SUCCESS.getMessage()); } @PatchMapping("/role") - @Operation(summary="관리자로 승격/강등") + @Operation(summary = "관리자로 승격/강등") public CommonResponse update(@RequestParam Long userId, @RequestParam String role) { userManageUseCase.update(userId, role); return CommonResponse.createSuccess(USER_ROLE_UPDATE_SUCCESS.getMessage()); } @PatchMapping("/apply") - @Operation(summary="다음 기수도 이어서 진행") + @Operation(summary = "다음 기수도 이어서 진행") public CommonResponse applyOB(@RequestParam Long userId, @RequestParam Integer cardinal) { userManageUseCase.applyOB(userId, cardinal); return CommonResponse.createSuccess(USER_APPLY_OB_SUCCESS.getMessage()); } @PatchMapping("/reset") - @Operation(summary="회원 비밀번호 초기화") + @Operation(summary = "회원 비밀번호 초기화") public CommonResponse resetPassword(@RequestParam Long userId) { userManageUseCase.reset(userId); return CommonResponse.createSuccess(USER_PASSWORD_RESET_SUCCESS.getMessage()); From 68f4e984036fdc15daa35b9c6952647d4f814b78 Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 21:56:07 +0900 Subject: [PATCH 7/9] =?UTF-8?q?refactor:=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=EB=A5=BC=20=EB=B0=9B=EC=95=84=20=EC=96=B4=EB=93=9C?= =?UTF-8?q?=EB=AF=BC=EC=9A=A9=20=ED=9A=8C=EC=9B=90=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usecase/UserManageUseCase.java | 3 +- .../usecase/UserManageUseCaseImpl.java | 29 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCase.java b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCase.java index c68575d1..c0a3782c 100644 --- a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCase.java +++ b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCase.java @@ -1,13 +1,14 @@ package leets.weeth.domain.user.application.usecase; import leets.weeth.domain.user.application.dto.response.UserResponseDto; +import leets.weeth.domain.user.domain.entity.enums.UsersOrderBy; import java.util.List; public interface UserManageUseCase { - List findAllByAdmin(); + List findAllByAdmin(UsersOrderBy orderBy); void accept(Long userId); diff --git a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java index 32ed0907..e0f0ab0c 100644 --- a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java +++ b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java @@ -4,9 +4,11 @@ import leets.weeth.domain.attendance.domain.service.AttendanceSaveService; import leets.weeth.domain.schedule.domain.entity.Meeting; import leets.weeth.domain.schedule.domain.service.MeetingGetService; +import leets.weeth.domain.user.application.exception.InvalidUserOrderException; import leets.weeth.domain.user.application.mapper.UserMapper; import leets.weeth.domain.user.domain.entity.User; -import leets.weeth.domain.user.domain.entity.enums.Status; +import leets.weeth.domain.user.domain.entity.enums.StatusPriority; +import leets.weeth.domain.user.domain.entity.enums.UsersOrderBy; import leets.weeth.domain.user.domain.service.UserDeleteService; import leets.weeth.domain.user.domain.service.UserGetService; import leets.weeth.domain.user.domain.service.UserUpdateService; @@ -16,12 +18,12 @@ import org.springframework.stereotype.Service; import java.util.Comparator; +import java.util.EnumSet; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; import static leets.weeth.domain.user.application.dto.response.UserResponseDto.AdminResponse; -import static leets.weeth.domain.user.domain.entity.enums.Status.*; +import static leets.weeth.domain.user.domain.entity.enums.UsersOrderBy.*; @Service @RequiredArgsConstructor @@ -39,19 +41,18 @@ public class UserManageUseCaseImpl implements UserManageUseCase { private final PasswordEncoder passwordEncoder; @Override - public List findAllByAdmin() { - // 우선순위 지정 - Map statusPriority = Map.of( - ACTIVE, 1, - WAITING, 2, - LEFT, 3, - BANNED, 4 - ); - - return userGetService.findAll().stream() - .sorted(Comparator.comparingInt(user -> statusPriority.getOrDefault(user.getStatus(), Integer.MAX_VALUE))) + public List findAllByAdmin(UsersOrderBy orderBy) { + if(orderBy == null || !EnumSet.allOf(UsersOrderBy.class).contains(orderBy)){ + throw new InvalidUserOrderException(); + } + if(orderBy.equals(NAME_ASCENDING)){ + return userGetService.findAll().stream() + .sorted(Comparator.comparingInt((user->(StatusPriority.fromStatus(user.getStatus())).getPriority()))) .map(mapper::toAdminResponse) .collect(Collectors.toList()); + } + // To do : 추후 기수 분리 후 작업 예정 + return null; } @Override From c2f06c2321ded40c8bbb39d175c264b1512958db Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 22:42:15 +0900 Subject: [PATCH 8/9] =?UTF-8?q?refactor:=20toList()=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=20=EC=82=AC=EC=9A=A9=EC=9C=BC=EB=A1=9C=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EA=B0=84=EC=86=8C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/application/usecase/UserManageUseCaseImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java index e0f0ab0c..76a9abb9 100644 --- a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java +++ b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java @@ -49,7 +49,7 @@ public List findAllByAdmin(UsersOrderBy orderBy) { return userGetService.findAll().stream() .sorted(Comparator.comparingInt((user->(StatusPriority.fromStatus(user.getStatus())).getPriority()))) .map(mapper::toAdminResponse) - .collect(Collectors.toList()); + .toList(); } // To do : 추후 기수 분리 후 작업 예정 return null; From d2d0dac30ea1ac21702e21e88c8f8b220dd2694e Mon Sep 17 00:00:00 2001 From: jj Date: Sun, 5 Jan 2025 22:44:15 +0900 Subject: [PATCH 9/9] =?UTF-8?q?style:=20=EA=B0=80=EB=8F=85=EC=84=B1=20?= =?UTF-8?q?=ED=96=A5=EC=83=81=EC=9D=84=20=EC=9C=84=ED=95=B4=20=EA=B0=9C?= =?UTF-8?q?=ED=96=89=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/application/usecase/UserManageUseCaseImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java index 76a9abb9..2586dee8 100644 --- a/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java +++ b/src/main/java/leets/weeth/domain/user/application/usecase/UserManageUseCaseImpl.java @@ -45,6 +45,7 @@ public List findAllByAdmin(UsersOrderBy orderBy) { if(orderBy == null || !EnumSet.allOf(UsersOrderBy.class).contains(orderBy)){ throw new InvalidUserOrderException(); } + if(orderBy.equals(NAME_ASCENDING)){ return userGetService.findAll().stream() .sorted(Comparator.comparingInt((user->(StatusPriority.fromStatus(user.getStatus())).getPriority()))) @@ -52,6 +53,7 @@ public List findAllByAdmin(UsersOrderBy orderBy) { .toList(); } // To do : 추후 기수 분리 후 작업 예정 + return null; }