-
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
[Fix] Snap Dto 통합 #116 #117
Conversation
@Parameters({ | ||
@Parameter(name = "targetLoginId" , description = "친구목록을 조회할 유저의 loginId", required = true,example = "tempLoginId"), | ||
@Parameter(name = "targetLoginId" , description = "친구목록을 조회할 유저의 writerLoginId", required = true,example = "tempLoginId"), |
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.
인텔리제이 refactor기능 이용하면 자주 이러는데 loginId 변수명 바뀔 때 다른 코드의 loginId도 같이 바뀐거같아요. 다른 부분도 많이 바뀐거같아서 변경기록보고 수정해야할거같아요
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.
이런.. 그냥 close 하고 처음부터 다시 수정해야겠네
public record FindSnapResDto( | ||
public record AlbumSnapResDto( |
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.
스냅dto를 하나로 합치는거면 둘중에 dto하나는 나중에 삭제하는건가요?
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.
아니야 하나는 앨범 전체 조회시 조회되는 Dto로 남게 될거야
String userUid = null; | ||
String userName = null; | ||
if (entity.getUser() != null) { | ||
userUid = entity.getUser().getLoginId(); | ||
userName = entity.getUser().getName(); | ||
} |
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.
스냅에 연결된 유저가 null인 경우는 없어서 이부분은 불필요한거같습니다.
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.
그러네! 수정하도록 할게
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(); | ||
} | ||
|
||
} |
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.
지금 똑같은 정적메소드가 두개생성된거같아요.
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.
아니야 첫번째 매개변수가 달라
📋 이슈 번호
close #116
🛠 구현 사항
SnapPagingInfo -> SnapResInfo로 이름 변경하였음
FindSnapResDto -> AlbumSnapResDto로 이름 변경하였음
📚 기타