-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 아티클 이메일 전송시 전송 이벤트 기록하도록 수정
- Loading branch information
1 parent
1c42574
commit 51d148f
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
api/src/main/kotlin/com/few/api/domain/subscription/service/SubscriptionLogService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.few.api.domain.subscription.service | ||
|
||
import com.few.api.domain.subscription.service.dto.InsertSendEventDto | ||
import com.few.api.repo.dao.log.SendArticleEventHistoryDao | ||
import com.few.api.repo.dao.log.command.InsertEventCommand | ||
import com.few.api.web.support.EmailLogEventType | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class SubscriptionLogService( | ||
private val sendArticleEventHistoryDao: SendArticleEventHistoryDao, | ||
) { | ||
|
||
fun insertSendEvent(dto: InsertSendEventDto) { | ||
sendArticleEventHistoryDao.insertEvent( | ||
InsertEventCommand( | ||
memberId = dto.memberId, | ||
articleId = dto.articleId, | ||
messageId = dto.messageId, | ||
eventType = EmailLogEventType.SEND.code, | ||
sendType = dto.sendType | ||
) | ||
) | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
api/src/main/kotlin/com/few/api/domain/subscription/service/dto/InsertSendEventDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.few.api.domain.subscription.service.dto | ||
|
||
data class InsertSendEventDto( | ||
val memberId: Long, | ||
val articleId: Long, | ||
val messageId: String, | ||
val sendType: Byte, | ||
) |