Skip to content

Commit

Permalink
[Fix/#413] 평일에 매일 전송 설정한 구독이 보내지지 않는 문제 해결 (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
belljun3395 authored Sep 25, 2024
1 parent 8d8b2ea commit b3ffa52
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,19 @@ class WorkBookSubscriberReader(
}

private fun sendDayCondition(sendDayField: TableField<SubscriptionRecord, String>, sendDayCode: BatchDayCode): Condition {
return if (sendDayCode == BatchDayCode.MON_TUE_WED_THU_FRI_SAT_SUN) {
sendDayField.eq(BatchDayCode.MON_TUE_WED_THU_FRI.code).or(sendDayField.eq(BatchDayCode.MON_TUE_WED_THU_FRI_SAT_SUN.code))
} else {
sendDayField.eq(sendDayCode.code)
return when (sendDayCode) {
/** 평일인 경우 매일을 포함하여 전송한다 */
BatchDayCode.MON_TUE_WED_THU_FRI -> {
sendDayField.eq(BatchDayCode.MON_TUE_WED_THU_FRI.code)
.or(sendDayField.eq(BatchDayCode.MON_TUE_WED_THU_FRI_SAT_SUN.code))
}
/** 매일의 경우 매일만 전송한다 */
BatchDayCode.MON_TUE_WED_THU_FRI_SAT_SUN -> {
sendDayField.eq(BatchDayCode.MON_TUE_WED_THU_FRI_SAT_SUN.code)
}
else -> {
throw IllegalArgumentException("Invalid sendDayCode: $sendDayCode")
}
}
}
}

0 comments on commit b3ffa52

Please sign in to comment.