feat: 유저 행동 데이터 기록 추가 - 콘텐츠에 댓글 쓰기
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user