Skip to content

Commit 992acf7

Browse files
committed
fix: 유저 모임 조회시 마지막 알림 일자 보여주기
1 parent bb67f82 commit 992acf7

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

tuk-api/src/main/kotlin/nexters/tuk/application/gathering/GatheringMemberService.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import nexters.tuk.contract.ErrorType
66
import nexters.tuk.domain.gathering.*
77
import org.springframework.stereotype.Service
88
import org.springframework.transaction.annotation.Transactional
9+
import java.time.LocalDateTime
910

1011
@Service
1112
class GatheringMemberService(
@@ -38,7 +39,7 @@ class GatheringMemberService(
3839
GatheringMemberResponse.MemberGatherings(
3940
id = memberGathering.gathering.id,
4041
name = memberGathering.gathering.name,
41-
pushIntervalDays = memberGathering.gathering.intervalDays.toInt(),
42+
lastPushedAt = memberGathering.gathering.lastPushedAt ?: LocalDateTime.now(),
4243
)
4344
}.sortedBy { it.name }
4445
}

tuk-api/src/main/kotlin/nexters/tuk/application/gathering/GatheringQueryService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class GatheringQueryService(
2525
GatheringResponse.GatheringOverviews.GatheringOverview(
2626
gatheringId = it.id,
2727
gatheringName = it.name,
28-
lastNotificationRelativeTime = RelativeTime.fromDays(it.pushIntervalDays)
28+
lastPushRelativeTime = RelativeTime.from(it.lastPushedAt)
2929
)
3030
}
3131

tuk-api/src/main/kotlin/nexters/tuk/application/gathering/dto/response/GatheringMemberResponse.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package nexters.tuk.application.gathering.dto.response
22

33
import io.swagger.v3.oas.annotations.media.Schema
4+
import java.time.LocalDateTime
45

56
class GatheringMemberResponse {
67
@Schema(name = "JoinGatheringResponse")
@@ -11,6 +12,6 @@ class GatheringMemberResponse {
1112
data class MemberGatherings(
1213
val id: Long,
1314
val name: String,
14-
val pushIntervalDays: Int,
15+
val lastPushedAt: LocalDateTime,
1516
)
1617
}

tuk-api/src/main/kotlin/nexters/tuk/application/gathering/dto/response/GatheringResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GatheringResponse {
2929
@Schema(description = "모임명")
3030
val gatheringName: String,
3131
@Schema(description = "상대 시간 타입 - \"오늘\", \"n일 전\", \"n주 전\", \"n개월 전\", \"n년 전\" ")
32-
val lastNotificationRelativeTime: RelativeTime,
32+
val lastPushRelativeTime: RelativeTime,
3333
)
3434
}
3535

tuk-batch/src/main/kotlin/nexters/tuk/domain/gathering/Gathering.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Gathering(
2121
@Column(name = "deleted_at", nullable = true)
2222
val deletedAt: LocalDateTime,
2323
) {
24-
@Column(name = "last_pushed_at", nullable = true, updatable = false)
24+
@Column(name = "last_pushed_at", nullable = true)
2525
var lastPushedAt = lastPushedAt
2626
private set
2727

0 commit comments

Comments
 (0)