-
Notifications
You must be signed in to change notification settings - Fork 1
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
프로젝트 기술 스택 및 멤버 카테고리 별로 조회되도록 응답 객체 수정 #235
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
24850c2
feat: projectSkill service에 카테고리 별로 기술 스택을 맵핑하는 메서드 생성
yenzip b032682
refactor: projectSkill 프로젝트별 조회 시 카테고리 별로 기술 스택 조회되도록 수정
yenzip e6de090
refactor: project 기술 스택 정보 응답 dto 카테고리 별로 기술 스택 반환하도록 수정
yenzip 1ef1a6f
refactor: project 프로젝트 상세 조회 시 기술 스택 응답 객체 변경에 따른 service 메서드 수정
yenzip 203145b
test: project 프로젝트 상세 조회 시 기술 스택 응답 객체 변경에 따른 테스트 코드 변경
yenzip 7a730a2
refactor: projectSkill 맵핑 메서드 변수 이름 변경
yenzip cee2d85
refactor: userSummary 회원 및 비회원을 통합하는 정적 팩터리 메서드로 변경
yenzip 5911643
refactor: project 멤버 정보 응답 dto 역할 별로 멤버 반환하도록 수정
yenzip 5803738
feat: member service에 역할 별로 멤버를 맵핑하는 메서드 생성
yenzip bc5196f
refactor: member 프로젝트 상세 조회 시 역할 별로 멤버 조회되도록 수정
yenzip 95d2809
refactor: project 상세 조회 시 멤버 정보 응답 객체 변경에 따른 service 메서드 수정
yenzip 8cb2021
test: project 상세 조회 시 멤버 정보 응답 객체 변경에 따른 테스트 코드 변경
yenzip 2fe2e4d
test: project 생서 및 삭제 시 기술 스택과 멤버 카테고리 및 역할 별로 응답 객체 변경에 따른 테스트 코드 수정
yenzip a123dea
style: 연속적인 공백 제거
yenzip dc6c09f
test: 기술 스택 및 멤버 카테고리별로 개수 구하는 메서드 추가
yenzip 1837e88
test: project 기술 스택 및 멤버 카테고리별로 개수 구하는 메서드 사용하도록 관련 테스트 수정
yenzip 8e9b583
refactor: member repository 사용하지 않는 findAllWithUser 메서드 제거 및 관련 파일 제거
yenzip 0564386
refactor: memberRepository 서브 패키지 제거에 따른 위치 변경
yenzip da93245
test: memberRepository 서브 패키지 제거에 따른 위치 변경
yenzip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
18 changes: 7 additions & 11 deletions
18
src/main/java/sixgaezzang/sidepeek/projects/dto/response/MemberSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
package sixgaezzang.sidepeek.projects.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import sixgaezzang.sidepeek.projects.domain.member.Member; | ||
import sixgaezzang.sidepeek.users.domain.User; | ||
import sixgaezzang.sidepeek.users.dto.response.UserSummary; | ||
|
||
@Schema(description = "프로젝트 멤버 정보") | ||
@Builder | ||
public record MemberSummary( | ||
@Schema(description = "프로젝트 멤버 식별자", example = "1") | ||
Long id, | ||
@Schema(description = "프로젝트 멤버 역할", example = "백엔드") | ||
String role, | ||
@Schema(description = "프로젝트 멤버 회원/비회원 상세 정보") | ||
UserSummary userSummary | ||
List<UserSummary> userSummary | ||
) { | ||
|
||
public static MemberSummary from(Member member) { | ||
User user = member.getUser(); | ||
UserSummary userSummary = (user != null) ? UserSummary.from(user, member.getNickname()) : | ||
UserSummary.from(member.getNickname()); | ||
|
||
return new MemberSummary(member.getId(), member.getRole(), userSummary); | ||
public static MemberSummary of(String role, List<UserSummary> members) { | ||
return MemberSummary.builder() | ||
.role(role) | ||
.userSummary(members) | ||
.build(); | ||
} | ||
|
||
} |
13 changes: 5 additions & 8 deletions
13
src/main/java/sixgaezzang/sidepeek/projects/dto/response/ProjectSkillSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/repository/member/MemberRepository.java → ...projects/repository/MemberRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
src/main/java/sixgaezzang/sidepeek/projects/repository/member/MemberRepositoryCustom.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...main/java/sixgaezzang/sidepeek/projects/repository/member/MemberRepositoryCustomImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,11 @@ | |
public record UserSummary( | ||
@Schema(description = "회원 식별자(비회원은 null)", nullable = true, example = "1") | ||
Long id, | ||
|
||
@Schema(description = "소셜 로그인 회원 여부", nullable = true, example = "false") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
Boolean isSocialLogin, | ||
|
||
@Schema(description = "회원/비회원 닉네임", example = "의진") | ||
String nickname, | ||
|
||
@Schema(description = "회원 프로필 이미지, 비회원이거나 없으면 빈 문자열 반환", nullable = true, | ||
example = "https://user-images.githubusercontent.com/uijin.png") | ||
String profileImageUrl | ||
|
@@ -48,23 +45,15 @@ public static UserSummary from(User user) { | |
.build(); | ||
} | ||
|
||
// 멤버(회원) | ||
public static UserSummary from(User user, String nickname) { | ||
return UserSummary.builder() | ||
.id(user.getId()) | ||
.isSocialLogin(null) | ||
.nickname(nickname) | ||
.profileImageUrl(user.getProfileImageUrl()) | ||
.build(); | ||
} | ||
// 멤버(회원, 비회원) | ||
public static UserSummary of(User user, String nickname) { | ||
Long userId = Objects.isNull(user) ? null : user.getId(); | ||
String profileImageUrl = Objects.isNull(user) ? BLANK_STRING : user.getProfileImageUrl(); | ||
Comment on lines
+48
to
+51
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. 코드 중복 줄여주셔서 감사합니다ㅠㅠ |
||
|
||
// 멤버(비회원) | ||
public static UserSummary from(String nickname) { | ||
return UserSummary.builder() | ||
.id(null) | ||
.isSocialLogin(null) | ||
.id(userId) | ||
.nickname(nickname) | ||
.profileImageUrl(BLANK_STRING) | ||
.profileImageUrl(profileImageUrl) | ||
.build(); | ||
} | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
👍 감사합니다ㅠㅠ 새로 배워가네요ㅠㅠ