Skip to content

Commit 052b5d7

Browse files
committed
[FIX] API 필요 필드 추가
1 parent 6ed41a1 commit 052b5d7

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎src/main/java/com/example/dplus/dto/response/AccountResponseDto.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,12 @@ public static class MyAnswer {
188188
private String post_title;
189189
private Boolean is_selected;
190190
private Long post_id;
191+
private Boolean post_is_selected;
191192

192193
@Builder
193194
public MyAnswer(final Long post_answer_id, final String content, final Long like_count,
194195
final Timestamp create_time, final Timestamp modify_time, final String profileImg,
195-
final String post_title, final Boolean is_selected,final Long post_id) {
196+
final String post_title, final Boolean is_selected,final Long post_id,final Boolean post_is_selected) {
196197
this.post_answer_id = post_answer_id;
197198
this.content = content;
198199
this.like_count = like_count;
@@ -202,6 +203,7 @@ public MyAnswer(final Long post_answer_id, final String content, final Long like
202203
this.post_title = post_title;
203204
this.is_selected = is_selected;
204205
this.post_id = post_id;
206+
this.post_is_selected = post_is_selected;
205207
}
206208

207209
}
@@ -216,18 +218,20 @@ public static class MyComment {
216218
private Timestamp modify_time;
217219
private String profileImg;
218220
private Long post_id;
221+
private String post_title;
219222

220223
@Builder
221224
public MyComment(final Long post_comment_id, final String content, final Long like_count,
222225
final Timestamp create_time, final Timestamp modify_time, final String profileImg,
223-
final Long post_id) {
226+
final Long post_id,final String post_title) {
224227
this.post_comment_id = post_comment_id;
225228
this.content = content;
226229
this.like_count = like_count;
227230
this.create_time = create_time;
228231
this.modify_time = modify_time;
229232
this.profileImg = profileImg;
230233
this.post_id = post_id;
234+
this.post_title =post_title;
231235
}
232236
}
233237

‎src/main/java/com/example/dplus/repository/post/answer/PostAnswerRepositoryImpl.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ public List<AccountResponseDto.MyAnswer> findPostAnswerByAccountId(Long accountI
5454
account.profileImg,
5555
post.title,
5656
postAnswer.isSelected,
57-
post.id
57+
post.id,
58+
post.isSelected
5859
))
5960
.from(postAnswer)
6061
.join(postAnswer.account, account).on(account.id.eq(accountId))

‎src/main/java/com/example/dplus/repository/post/comment/PostCommentRepositoryImpl.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public List<AccountResponseDto.MyComment> findPostCommentByAccountId(Long accoun
5050
postComment.created,
5151
postComment.modified,
5252
account.profileImg,
53-
post.id
53+
post.id,
54+
post.title
5455
))
5556
.from(postComment)
5657
.join(postComment.account, account).on(account.id.eq(accountId))

0 commit comments

Comments
 (0)