feat: 유저 행동 데이터 기록 추가 - 콘텐츠에 댓글 쓰기

This commit is contained in:
2025-05-16 20:32:48 +09:00
parent eb8c8c14e8
commit ddcd54d3b9
7 changed files with 132 additions and 52 deletions

View File

@@ -24,7 +24,12 @@ class UserActionService(
private val coroutineScope = CoroutineScope(Dispatchers.IO)
fun recordAction(memberId: Long, actionType: ActionType, orderId: Long? = null, pushToken: String? = null) {
fun recordAction(
memberId: Long,
actionType: ActionType,
orderId: Long? = null,
pushTokenList: List<String> = emptyList()
) {
coroutineScope.launch {
val now = LocalDateTime.now()
repository.save(UserActionLog(memberId, actionType))
@@ -73,8 +78,8 @@ class UserActionService(
)
)
if (pushToken != null) {
fcmService.sendPointGranted(pushToken, policy.pointAmount)
if (pushTokenList.isNotEmpty()) {
fcmService.sendPointGranted(pushTokenList, policy.pointAmount)
}
}
}