Skip to content

Commit

Permalink
๐Ÿ”€ :: (#207) ์ƒ๋ฒŒ์  ๋ถ€์—ฌ ์•Œ๋ฆผ content ์ˆ˜์ • (#57)
Browse files Browse the repository at this point in the history
* โ™ป๏ธ :: ์ƒ๋ฒŒ์  ๋ถ€์—ฌ ์•Œ๋ฆผ content ์ˆ˜์ •

* โ™ป๏ธ :: ๋ณ€์ˆ˜ ์‚ญ์ œ

* โ™ป๏ธ :: ktlint

* โ™ป๏ธ :: ๋ฆฌ๋ทฐ ๋ฐ˜์˜

* โ™ป๏ธ :: ๋ฉ”์†Œ๋“œ ๋ฆฌํŒฉํ† ๋ง

๋ฆฌ๋ทฐ ๋ฐ˜์˜

* โ™ป๏ธ :: ktlint
  • Loading branch information
jyk1029 authored Jul 19, 2023
1 parent 2075482 commit 36fd66d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PointHistoryApiImpl(
}

private suspend fun sendNotification(userId: UUID, isGoodPoint: Boolean, reason: String, point: Int) {
val notificationMessage = "${reason}์œผ๋กœ ์ธํ•ด ${point}์ ์„ ๋ฐ›์•˜์–ด์š”."
val notificationMessage = convertPostfix(reason) + " ์ธํ•ด ${point}์ ์„ ๋ฐ›์•˜์Šต๋‹ˆ๋‹ค."
val topic = if (isGoodPoint) "ALL_GOOD_POINT" else "ALL_BAD_POINT"
val threadId = "ALL_POINT"

Expand Down Expand Up @@ -138,6 +138,13 @@ class PointHistoryApiImpl(
}
}

private fun convertPostfix(reason: String): String {
val lastSpell = reason.last()
val isPostfix = ((lastSpell.code - 0xAC00) % 28 > 0 && (lastSpell.code - 0xAC00) % 28 != 8)
val postfix = if (isPostfix) "์œผ๋กœ" else "๋กœ"
return reason + postfix
}

override suspend fun queryUserPointHistoryExcel(): ExportUserPointStatusResponse {
val fileName = String(
bytes = "์ƒ๋ฒŒ์  ๋ถ€์—ฌ๋‚ด์—ญ ${LocalDate.now()}.xlsx".toByteArray(charset("UTF-8")),
Expand Down

0 comments on commit 36fd66d

Please sign in to comment.