diff --git a/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/dto/request/SaveDisastersRequest.kt b/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/dto/request/SaveDisastersRequest.kt index 27479de..a7e0648 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/dto/request/SaveDisastersRequest.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/dto/request/SaveDisastersRequest.kt @@ -8,7 +8,7 @@ data class SaveDisastersRequest( ) data class DisasterRequest( - @Schema(description = "재난 발생 시간", example = "2021-08-01T00:00:00") + @Schema(description = "재난 알림 시간", example = "2021-08-01T00:00:00") val generatedAt: LocalDateTime, @Schema(description = "재난 메시지 ID", example = "1") @@ -20,7 +20,7 @@ data class DisasterRequest( ) val message: String, - @Schema(description = "재난 발생 위치", example = "서울특별시 종로구") + @Schema(description = "재난 알림 위치", example = "서울특별시 종로구") val locationStr: String, @Schema(description = "재난 종류", example = "지진") diff --git a/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/service/DataCollectorService.kt b/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/service/DataCollectorService.kt index b2679f2..1747dc0 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/service/DataCollectorService.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/dataCollecter/service/DataCollectorService.kt @@ -113,7 +113,7 @@ class DataCollectorService( notificationService.sendNotification( uniqueUsers, NotificationCategory.DISASTER, - "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 발생", + "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 알림", "대피로에서 ${disaster.disasterType.type.korean} 행동요령을 확인해보세요." ) } diff --git a/src/main/kotlin/com/numberone/daepiro/domain/disaster/entity/Disaster.kt b/src/main/kotlin/com/numberone/daepiro/domain/disaster/entity/Disaster.kt index 8d81036..1042ac7 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/disaster/entity/Disaster.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/disaster/entity/Disaster.kt @@ -67,6 +67,6 @@ class Disaster( } fun getTitle(): String { - return "${address.toFullAddress()} ${disasterType.type.korean} 발생" + return "${address.toFullAddress()} ${disasterType.type.korean} 알림" } } diff --git a/src/main/kotlin/com/numberone/daepiro/domain/disasterSituation/dto/response/DisasterSituationResponse.kt b/src/main/kotlin/com/numberone/daepiro/domain/disasterSituation/dto/response/DisasterSituationResponse.kt index 168a4ee..4f45cd4 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/disasterSituation/dto/response/DisasterSituationResponse.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/disasterSituation/dto/response/DisasterSituationResponse.kt @@ -16,7 +16,7 @@ data class DisasterSituationResponse( @Schema(description = "재난 종류 id", example = "호우") val typeId: Long, - @Schema(description = "제목", example = "서울특별시 성북구 쌍문동 호우 발생") + @Schema(description = "제목", example = "서울특별시 성북구 쌍문동 호우 알림") val title: String, @Schema(description = "내용", example = "금일 10.23. 19:39경 소촌동 855 화재 발생, 인근주민은 안전 유의 및 차량우회바랍니다. 960-8222") @@ -25,7 +25,7 @@ data class DisasterSituationResponse( @Schema(description = "위치", example = "서울특별시 성북구") val location: String, - @Schema(description = "발생 시간", example = "2024-10-23T19:53:00") + @Schema(description = "알림 시간", example = "2024-10-23T19:53:00") val time: LocalDateTime, @Schema(description = "댓글 수", example = "3") diff --git a/src/main/kotlin/com/numberone/daepiro/domain/home/api/HomeApiV1.kt b/src/main/kotlin/com/numberone/daepiro/domain/home/api/HomeApiV1.kt index c700d08..3d46811 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/home/api/HomeApiV1.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/home/api/HomeApiV1.kt @@ -44,15 +44,15 @@ interface HomeApiV1 { ): ApiResult> @GetMapping("/warnings") - @Operation(summary = "(재난 발생 시) 홈 현재 발생 재난 피드 조회", description = "홈 화면에 표시할 현재 발생 중인 재난을 조회합니다.") + @Operation(summary = "(재난 알림 시) 홈 현재 알림 재난 피드 조회", description = "홈 화면에 표시할 현재 알림 중인 재난을 조회합니다.") fun getWarning(): ApiResult @GetMapping("/status") - @Operation(summary = "현재 재난 발생 유무 조회", description = "현재 재난이 발생 중인지 조회합니다.") + @Operation(summary = "현재 재난 알림 유무 조회", description = "현재 재난이 알림 중인지 조회합니다.") fun getStatus(): ApiResult @GetMapping("/shelters/{type}") - @Operation(summary = "(재난 발생 시) 홈 대피소 피드 조회", description = """ + @Operation(summary = "(재난 알림 시) 홈 대피소 피드 조회", description = """ 대피소 목록을 조회합니다. """) fun getShelters( @@ -64,7 +64,7 @@ interface HomeApiV1 { @GetMapping("/tip/{disasterId}") @Operation( - summary = "(재난 발생 시) 홈 행동요령 피드 조회", description = """ + summary = "(재난 알림 시) 홈 행동요령 피드 조회", description = """ 홈 행동요령 피드를 조회합니다. 현재 발생한 재난 조회 api에서 얻은 재난유형 id값을 입력해주세요. """ diff --git a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetStatusResponse.kt b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetStatusResponse.kt index ef03cbc..e1cbc08 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetStatusResponse.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetStatusResponse.kt @@ -3,6 +3,6 @@ package com.numberone.daepiro.domain.home.dto.response import io.swagger.v3.oas.annotations.media.Schema data class GetStatusResponse( - @Schema(description = "현재 재난 발생 유무", example = "true") + @Schema(description = "현재 재난 알림 유무", example = "true") val isOccurred: Boolean ) diff --git a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetWarningResponse.kt b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetWarningResponse.kt index 94606a6..cad6115 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetWarningResponse.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/GetWarningResponse.kt @@ -11,13 +11,13 @@ data class GetWarningResponse( @Schema(description="재난유형 id", example="26") val disasterTypeId: Long, - @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 발생") + @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 알림") val title: String, @Schema(description = "내용", example = "금일 10.23. 19:39경 소촌동 855 화재 발생, 인근주민은 안전유의 및 차량우회바랍니다. 960-8222") val content: String, - @Schema(description = "발생 시간", example = "2024-10-23T19:53:00") + @Schema(description = "알림 시간", example = "2024-10-23T19:53:00") val time: LocalDateTime ) { companion object { @@ -25,7 +25,7 @@ data class GetWarningResponse( return GetWarningResponse( disasterType = disaster.disasterType.type.korean, disasterTypeId = disaster.disasterType.id!!, - title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 발생", + title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 알림", content = disaster.message, time = disaster.generatedAt ) diff --git a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/HomeDisasterFeed.kt b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/HomeDisasterFeed.kt index a52e023..a1a5021 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/HomeDisasterFeed.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/home/dto/response/HomeDisasterFeed.kt @@ -11,13 +11,13 @@ data class HomeDisasterFeed( @Schema(description = "재난 종류 ID", example = "26") val disasterTypeId: Long, - @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 발생") + @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 알림") val title: String, @Schema(description = "내용", example = "금일 10.23. 19:39경 소촌동 855 화재 발생, 인근주민은 안전유의 및 차량우회바랍니다. 960-8222") val content: String, - @Schema(description = "발생 시간", example = "2024-10-23T19:53:00") + @Schema(description = "알림 시간", example = "2024-10-23T19:53:00") val time: LocalDateTime ) { companion object { @@ -25,7 +25,7 @@ data class HomeDisasterFeed( return HomeDisasterFeed( disasterType = disaster.disasterType.type.korean, disasterTypeId = disaster.disasterType.id!!, - title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 발생", + title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 알림", content = disaster.message, time = disaster.generatedAt ) diff --git a/src/main/kotlin/com/numberone/daepiro/domain/home/service/HomeService.kt b/src/main/kotlin/com/numberone/daepiro/domain/home/service/HomeService.kt index c5f8b15..81f1002 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/home/service/HomeService.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/home/service/HomeService.kt @@ -34,7 +34,7 @@ class HomeService( fun getHomeDisasters(userId: Long): ApiResult> { val user = userRepository.findByIdOrThrow(userId) val disasters = disasterService.getDisasterByAddressAndType( - user.userAddresses.map { it.address } + user.address!!, + user.userAddresses.map { it.address }, user.userDisasterTypes.map { it.disasterType } ) diff --git a/src/main/kotlin/com/numberone/daepiro/domain/user/dto/response/DisasterResponse.kt b/src/main/kotlin/com/numberone/daepiro/domain/user/dto/response/DisasterResponse.kt index 57dca6c..d18c573 100644 --- a/src/main/kotlin/com/numberone/daepiro/domain/user/dto/response/DisasterResponse.kt +++ b/src/main/kotlin/com/numberone/daepiro/domain/user/dto/response/DisasterResponse.kt @@ -11,13 +11,13 @@ data class DisasterResponse( @Schema(description = "재난 종류 ID", example = "26") val disasterTypeId:Long, - @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 발생") + @Schema(description = "제목", example = "서울시 성북구 쌍문동 호우 알림") val title: String, @Schema(description = "내용", example = "금일 10.23. 19:39경 소촌동 855 화재 발생, 인근주민은 안전유의 및 차량우회바랍니다. 960-8222") val content: String, - @Schema(description = "발생 시간", example = "2024-10-23T19:53:00") + @Schema(description = "알림 시간", example = "2024-10-23T19:53:00") val time: LocalDateTime ) { companion object { @@ -25,7 +25,7 @@ data class DisasterResponse( return DisasterResponse( disasterType = disaster.disasterType.type.korean, disasterTypeId = disaster.disasterType.id!!, - title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 발생", + title = "${disaster.address.toFullAddress()} ${disaster.disasterType.type.korean} 알림", content = disaster.message, time = disaster.generatedAt )