Skip to content
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

[Fix] Snap Dto 통합 #116 #117

Closed
wants to merge 1 commit into from

Conversation

NARUBROWN
Copy link
Contributor

📋 이슈 번호

close #116

🛠 구현 사항

SnapPagingInfo -> SnapResInfo로 이름 변경하였음
FindSnapResDto -> AlbumSnapResDto로 이름 변경하였음

📚 기타

@NARUBROWN NARUBROWN self-assigned this Jul 20, 2024
@NARUBROWN NARUBROWN linked an issue Jul 20, 2024 that may be closed by this pull request
Comment on lines 57 to +58
@Parameters({
@Parameter(name = "targetLoginId" , description = "친구목록을 조회할 유저의 loginId", required = true,example = "tempLoginId"),
@Parameter(name = "targetLoginId" , description = "친구목록을 조회할 유저의 writerLoginId", required = true,example = "tempLoginId"),
Copy link
Contributor

Choose a reason for hiding this comment

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

인텔리제이 refactor기능 이용하면 자주 이러는데 loginId 변수명 바뀔 때 다른 코드의 loginId도 같이 바뀐거같아요. 다른 부분도 많이 바뀐거같아서 변경기록보고 수정해야할거같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이런.. 그냥 close 하고 처음부터 다시 수정해야겠네

public record FindSnapResDto(
public record AlbumSnapResDto(
Copy link
Contributor

Choose a reason for hiding this comment

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

스냅dto를 하나로 합치는거면 둘중에 dto하나는 나중에 삭제하는건가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아니야 하나는 앨범 전체 조회시 조회되는 Dto로 남게 될거야

Comment on lines 20 to 25
String userUid = null;
String userName = null;
if (entity.getUser() != null) {
userUid = entity.getUser().getLoginId();
userName = entity.getUser().getName();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

스냅에 연결된 유저가 null인 경우는 없어서 이부분은 불필요한거같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그러네! 수정하도록 할게

Comment on lines +47 to 65
public static SnapResInfo toDto(Snap result, String profilePhotoURL, String snapPhotoURL,
List<FindTagUserResDto> findTagUserList, Long likeCnt, boolean isLikedSnap){

return SnapResInfo.builder()
.snapId(result.getId())
.oneLineJournal(result.getOneLineJournal())
.snapPhotoURL(snapPhotoURL)
.snapCreatedDate(result.getCreatedDate())
.snapModifiedDate(result.getLastModifiedDate())
.writerLoginId(result.getUser().getLoginId())
.profilePhotoURL(profilePhotoURL)
.writerUserName(result.getUser().getName())
.findTagUserList(findTagUserList)
.likeCnt(likeCnt)
.isLikedSnap(isLikedSnap)
.build();
}

}
Copy link
Contributor

Choose a reason for hiding this comment

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

지금 똑같은 정적메소드가 두개생성된거같아요.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아니야 첫번째 매개변수가 달라

@NARUBROWN NARUBROWN closed this Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] FindSnapResDto, SnapPagingInfo의 응답 Dto 통합
2 participants