Skip to content

Commit

Permalink
[#543] fix: 찜리스트 카테고리 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
heeeeeseok committed Jan 17, 2025
1 parent 33ef386 commit 5e9462c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ public PostPreviewDto(Long id, String title, String originUrl, String thumbnailU
this.firstImage = new ImageFileDto(originUrl, thumbnailUrl);
}

@QueryProjection
public PostPreviewDto(Long id, String title, String category, String originUrl,
String thumbnailUrl) {
this.id = id;
this.title = title;
this.category = category;
this.firstImage = new ImageFileDto(originUrl, thumbnailUrl);
}

public PostPreviewDto(PostPreviewDto postPreviewDto) {
this.id = postPreviewDto.getId();
this.title = postPreviewDto.getTitle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ public PostPreviewDto findPostPreviewDto(Long postId, Language language) {
.select(new QPostPreviewDto(
experience.id,
experienceTrans.title,
experience.experienceType.stringValue(),
imageFile.originUrl,
imageFile.thumbnailUrl
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.jeju.nanaland.domain.common.data.AddressTag;
import com.jeju.nanaland.domain.common.data.Category;
import com.jeju.nanaland.domain.common.data.Language;
import com.jeju.nanaland.domain.common.data.PostCategory;
import com.jeju.nanaland.domain.common.dto.ImageFileDto;
import com.jeju.nanaland.domain.common.dto.PostPreviewDto;
import com.jeju.nanaland.domain.common.entity.Post;
Expand Down Expand Up @@ -79,7 +78,6 @@ public PostPreviewDto getPostPreviewDto(Long postId, Category category, Language
Optional.ofNullable(postPreviewDto)
.orElseThrow(() -> new NotFoundException("해당 게시물을 찾을 수 없습니다."));

postPreviewDto.setCategory(PostCategory.EXPERIENCE.toString());
return postPreviewDto;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ public BaseResponse<List<PopularPostPreviewDto>> getPopularPosts(
}

@Operation(
summary = "랜덤 추천 게시물 2개 반환",
description = "홈에서 보여질 랜덤 추천 게시물 2개 반환")
summary = "랜덤 추천 게시물 3개 반환",
description = "홈에서 보여질 랜덤 추천 게시물 3개 반환")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "성공"),
@ApiResponse(responseCode = "400", description = "결과 타입에 없는 값으로 요청", content = @Content),
Expand Down

0 comments on commit 5e9462c

Please sign in to comment.