Skip to content

Conversation

@nano-mm
Copy link
Collaborator

@nano-mm nano-mm commented Jan 24, 2025

📄 요약(Summary)

요청 승인시 검토자가 담당자에게 작업을 할당할때 담당자의 닉네임, 프로필 url, 잔여작업 개수(진행중+완료대기)를 조회

✍🏼 상세(More)

PR Desciption

변경 사항 설명

  • 관리자의 닉네임, 프로필 이미지 URL, 잔여 작업 개수(진행 중 + 완료 대기)를 조회하는 findManagers API를 구현했습니다.
  • FindManagersResponse DTO를 추가하여 필요한 정보를 응답으로 반환하도록 했습니다.
  • FindManagersUsecase를 통해 관리자의 정보를 조회하고, ManagerController에서 해당 정보를 반환하도록 했습니다.
  • 작업을 진행 중인 관리자 목록을 가져오는 MemberService를 활용하여 필요한 데이터를 처리합니다.
  • 데이터가 없을 경우 빈 리스트를 반환하도록 처리하도록 했습니다.

Requirements for Reviewer

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요
ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

PR Log

PR 작업하면서 고민했던 내용, 해결한 내용, 고민 중인 내용 등

새롭게 배운 것

고민 중인 사항

첨부 자료

Requirements for Reviewer

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

✅ 체크리스트(Checklist)

  • [✅ ] PR 양식에 맞게 작성했습니다
  • 모든 테스트가 통과했습니다
  • [ ✅] 프로그램이 정상적으로 작동합니다
  • [ ✅] 적절한 PR 라벨을 설정했습니다
  • [ ✅] 불필요한 코드를 제거했습니다

🚪 이슈 번호(Issue numbers)

Closes #35

@nano-mm nano-mm self-assigned this Jan 24, 2025
@nano-mm nano-mm added the ✨ feature 구현·개선 사항에 관련된 내용입니다 label Jan 24, 2025
@nano-mm nano-mm changed the title Feature/clap 76 담당자 조회 api 구편 CLAP-76 담당자 조회 api 구편 Jan 24, 2025
@nano-mm
Copy link
Collaborator Author

nano-mm commented Jan 24, 2025

@joowojr 담당자 조회 api pull request 했습니다! 확인해주시면 감사하겠습니다!

@parkjaehak
Copy link
Collaborator

커밋컨벤션 지켜서 커밋올려주시면 좋을 것 같습니다. 추가로 중복된 커밋내용은 squash로 합친 후 적절한 커밋명으로 수정하여 업데이트 해주시면 좋을 것 같습니다~

Comment on lines 19 to 28
@GetMapping
public List<FindManagersResponse> findManagers() {
return findManagersUsecase.execute();

List<FindManagersResponse> managers = findManagersUsecase.execute();

if (managers.isEmpty()) {
return FindManagersResponse.emptyListResponse();
}

return managers;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http 상태코드와 함께 반환해주시면 좋을 것 같습니다.
예시) ResponseEntity.ok<managers>

Comment on lines 3 to 4
spring:
jpa:
hibernate:
ddl-auto: none
config:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 ddl-auto 설정 아예 지우신 걸까요??

Copy link
Contributor

@joowojr joowojr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!
코드 컨벤션이랑 안맞는 부분들이 좀 있어서, 노션 문서 꼼꼼히 보시고 다시 수정 부탁드립니다:)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dto의 자료형은 불변성 보장을 위해 record로 수정 부탁드립니다!

private final FindManagersUsecase findManagersUsecase;

@GetMapping
public List<FindManagersResponse> findManagers() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResponseEntity로 감싸서 보내주셔야합니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uscase의 구현체는 application/service 하위로 이동 부탁드리고 클래스명도 수정 부탁드립니다!

List<Member> managers = memberService.findActiveManagers();

if (managers.isEmpty()) {
return FindManagersResponse.emptyListResponse(); // 빈 리스트 반환
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

managers.isEmpty()일 때 빈 리스트를 반환하기 보다는, managers를 FindManagersResponse로 매핑을 먼저 하여 반환해야 할것 같습니다.

그러면 managers가 empty여도 FindManagersResponse도 empty로 반환 됩니다!

return FindManagersResponse.emptyListResponse(); // 빈 리스트 반환
}

return managers.stream().map(manager -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

매핑 부분은 mapper class로 옮겨서 부탁드립니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joowojr 넵 수정했습니다 확인해주시면 감사하겠습니다!

- 담당자 조회 API를 구현하였으며, 매니저의 정보를 조회할 수 있도록 처리
- 필요한 데이터는 담당자의 닉네임, 이미지 URL, 남은 작업 개수 등을 포함

<footer>
- 관련: #35
- http 상태코드 반환
- dto의 자료형 record로 수정
- ResponseEntity로 감싸서 반환
- usecase의 구현체를 application/service 하위로 이동, 클래스명 수정
- managers를 FindManagersResponse로 매핑을 먼저 하여 빈 리스트를 반환
- 매핑 부분은 mapper class 이동(manager mapper 생성)

<footer>
- 관련: #35
@nano-mm nano-mm changed the title CLAP-76 담당자 조회 api 구편 CLAP-76 담당자 조회 api 구현 Jan 24, 2025
@nano-mm nano-mm merged commit 8581b2b into develop Feb 3, 2025
1 check passed
@joowojr joowojr mentioned this pull request Feb 3, 2025
5 tasks
@nano-mm nano-mm deleted the feature/CLAP-76 branch February 7, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature 구현·개선 사항에 관련된 내용입니다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLAP-76 담당자 조회 API

4 participants