Skip to content
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 @@ -58,7 +58,7 @@ and exists (
)
)
and (
:cursorCreatedAt is null
cast(:cursorCreatedAt as timestamp) is null
or comment.createdAt < :cursorCreatedAt
or (
comment.createdAt = :cursorCreatedAt
Expand All @@ -82,7 +82,7 @@ List<CommentJpaEntity> findParentPage(
where reply.parentCommentId = :parentCommentId
and reply.status in :visibleStatuses
and (
:cursorCreatedAt is null
cast(:cursorCreatedAt as timestamp) is null
or reply.createdAt > :cursorCreatedAt
or (
reply.createdAt = :cursorCreatedAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ record PromptDetailProjection(
String title,
String authorNickname,
String authorProfileImageUrl,
String authorGradeName,
PromptOutputType outputType,
PromptContentType contentType,
Long pricePoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public PromptDetailInfo get(Long promptId, Long viewerId) {
new Author(
prompt.authorId(),
prompt.authorNickname(),
prompt.authorProfileImageUrl()),
prompt.authorProfileImageUrl(),
prompt.authorGradeName()),
prompt.outputType(),
prompt.contentType(),
prompt.pricePoint(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public record PromptDetailInfo(
Instant createdAt,
Instant updatedAt
) {
public record Author(Long userId, String nickname, String profileImageUrl) {
public record Author(Long userId, String nickname, String profileImageUrl, String gradeName) {
}

public record Access(boolean locked, AccessReason reason) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public Optional<PromptDetailProjection> findPublicById(Long promptId, Long viewe
author.getProfileImageUrl(),
author.getProfileImageObjectKey()
),
author.getGrade().name(),
post.getOutputType(),
post.getContentType(),
post.getPricePoint(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ public record PromptAuthorResponse(
example = "https://cdn.promsearch.com/profiles/12.jpg",
nullable = true
)
String profileImageUrl
String profileImageUrl,

@Schema(description = "작성자 크리에이터 등급 이름", example = "ORIGIN")
String gradeName
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public static PromptDetailResponse from(PromptDetailInfo info) {
new PromptAuthorResponse(
info.author().userId(),
info.author().nickname(),
info.author().profileImageUrl()),
info.author().profileImageUrl(),
info.author().gradeName()),
info.outputType(),
info.contentType(),
info.pricePoint(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ private PromptDetailProjection detailProjection(Long promptId) {
"prompt title",
"author",
null,
"NODE",
PromptOutputType.TEXT,
PromptContentType.PREMIUM,
100L,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ private PromptDetailProjection projection(
"회의록 정리",
"작성자",
null,
"NODE",
PromptOutputType.TEXT,
contentType,
contentType == PromptContentType.FREE ? 0L : 500L,
Expand Down
Loading