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

[feat]: 커뮤니티 글 조회 시 작성자 프로필 이미지 반환 #112

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class PostClickResponseDto {
private Long postId;
private String title;
private String author;
private String profileUrl;
private List<String> imgUrls;
private Integer size;
private Integer category;
Expand All @@ -30,11 +31,12 @@ public class PostClickResponseDto {

private boolean scrapFlag;

public PostClickResponseDto(String clickedMember, Long postId, String title, String author, List<String> imgUrls, Integer size, Integer category, Integer gender, Integer deliveryType, Integer deliveryFee, String address, Integer price, String detail, Integer postType, Integer postState, LocalDateTime createdAt, boolean scrapFlag) {
public PostClickResponseDto(String clickedMember, Long postId, String title, String author, String profileUrl, List<String> imgUrls, Integer size, Integer category, Integer gender, Integer deliveryType, Integer deliveryFee, String address, Integer price, String detail, Integer postType, Integer postState, LocalDateTime createdAt, boolean scrapFlag) {
this.clickedMember = clickedMember;
this.postId = postId;
this.title = title;
this.author = author;
this.profileUrl = profileUrl;
this.imgUrls = imgUrls;
this.size = size;
this.category = category;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/umc/refit/web/service/CommunityService.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public PostClickResponseDto create(PostDto postDto, List<MultipartFile> multipar
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -145,6 +146,7 @@ public PostClickResponseDto clickPost(Long postId, Authentication authentication
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -209,6 +211,7 @@ public PostClickResponseDto changeState(Long postId, Authentication authenticati
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -275,6 +278,7 @@ public PostClickResponseDto update(Long postId, PostDto postDto, List<MultipartF
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down Expand Up @@ -312,6 +316,7 @@ public PostClickResponseDto updateWithoutImage(Long postId, PostDto postDto, Aut
post.getId(),
post.getTitle(),
post.getMember().getName(),
post.getMember().getImageUrl(),
imgUrls,
post.getSize(),
post.getCategory(),
Expand Down
Loading