fix: 유저 행동 데이터 기록시 포인트 지급과 로그 기록 순서 변경
- 기존: 포인트 지급 후 로그 기록 - 변경: 로그 기록 후 포인트 지급
This commit is contained in:
parent
affc0cc235
commit
eb8c8c14e8
|
@ -54,15 +54,6 @@ class UserActionService(
|
|||
)
|
||||
if (grantedCount >= policy.availableCount) return@launch
|
||||
|
||||
memberPointRepository.save(
|
||||
MemberPoint(
|
||||
memberId = memberId,
|
||||
point = policy.pointAmount,
|
||||
actionType = actionType,
|
||||
expiresAt = now.plusDays(3)
|
||||
)
|
||||
)
|
||||
|
||||
grantLogRepository.save(
|
||||
PointGrantLog(
|
||||
memberId = memberId,
|
||||
|
@ -73,6 +64,15 @@ class UserActionService(
|
|||
)
|
||||
)
|
||||
|
||||
memberPointRepository.save(
|
||||
MemberPoint(
|
||||
memberId = memberId,
|
||||
point = policy.pointAmount,
|
||||
actionType = actionType,
|
||||
expiresAt = now.plusDays(3)
|
||||
)
|
||||
)
|
||||
|
||||
if (pushToken != null) {
|
||||
fcmService.sendPointGranted(pushToken, policy.pointAmount)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue