-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#105 #110
Feature/#105 #110
Changes from 3 commits
3772aeb
3c75dfe
75bfdf0
fd191a7
83947df
ee82417
56497ad
9bc6dc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,13 @@ public ResponseData<List<MemberInfoRes>> getDeactivateMembers() { | |
.toList()); | ||
} | ||
|
||
public ResponseData<List<MemberInfoRes>> getPendingMembers(){ | ||
return ResponseData.ok("보류중인 멤버 조회 성공", memberRepository.findByStatusOrderByStudent(ActiveStatus.PENDING) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 보류 -> 대기 라고 바꿔도 좋을 것 같습니다 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 해당 메서드도 pending만 불러오는것이 아닌 한개의 메서드로 통일시켜 파라미터로 구분하도록 수정하겠습니다 |
||
.parallelStream() | ||
.map(this::getMemberInfo) | ||
.toList()); | ||
} | ||
|
||
@Cacheable(value = "members-cache", key = "'activeMembers'") | ||
public List<MemberInfoRes> getAll() { | ||
return memberRepository.findByStatusOrderByStudent(ActiveStatus.ACTIVE).parallelStream() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package b1nd.dodam.restapi.member.presentation; | ||
|
||
import b1nd.dodam.domain.rds.member.enumeration.ActiveStatus; | ||
import b1nd.dodam.restapi.member.application.MemberCommandUseCase; | ||
import b1nd.dodam.restapi.member.application.MemberQueryUseCase; | ||
import b1nd.dodam.restapi.member.application.data.req.*; | ||
|
@@ -40,6 +41,11 @@ public Response delete(@PathVariable String id) { | |
return commandUseCase.delete(id); | ||
} | ||
|
||
@PatchMapping("/status/{id}") | ||
public Response updateStatus(@PathVariable("id") String id, @RequestParam ActiveStatus status){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ("id")는 삭제해도 될 것 같습니다 |
||
return commandUseCase.status(id, status); | ||
} | ||
|
||
@PatchMapping("/active/{id}") | ||
public Response active(@PathVariable("id") String id) { | ||
return commandUseCase.active(id); | ||
|
@@ -100,6 +106,11 @@ public ResponseData<List<MemberInfoRes>> getDeactivateMembers() { | |
return queryUseCase.getDeactivateMembers(); | ||
} | ||
|
||
@GetMapping("/pending") | ||
public ResponseData<List<MemberInfoRes>> getPendingMembers(){ | ||
return queryUseCase.getPendingMembers(); | ||
} | ||
|
||
@GetMapping("/all") | ||
public ResponseData<List<MemberInfoRes>> getAll() { | ||
return ResponseData.ok("모든 멤버 정보 조회 성공", queryUseCase.getAll()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
public enum ActiveStatus { | ||
|
||
ACTIVE, DEACTIVATE | ||
ACTIVE, DEACTIVATE, PENDING | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateStatus 같이 동사를 추가해서 네이밍해주세요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 updateStatus메서드를 사용하는 기존 메서드가 있어서 임시로 네이밍을 해뒀습니다
웹에서 변경사항에 맞춰 수정하면 기존메서드를 삭제하고 메서드 명도 updateStatus로 변경할 예정입니다.