test #316

Merged
klaus merged 20 commits from test into main 2025-05-20 06:03:11 +00:00
1 changed files with 28 additions and 32 deletions
Showing only changes of commit 36b8e8169e - Show all commits

View File

@ -102,14 +102,17 @@ class UserActionService(
)
if (grantedCount >= policy.availableCount) return@execute
grantLogRepository.save(
PointGrantLog(
memberId = memberId,
point = if (actionType == ActionType.ORDER_CONTENT_COMMENT && order != null) {
val point = if (actionType == ActionType.ORDER_CONTENT_COMMENT && order != null) {
order.can
} else {
policy.pointAmount
},
}
if (point > 0) {
grantLogRepository.save(
PointGrantLog(
memberId = memberId,
point = point,
actionType = actionType,
policyId = policy.id!!,
orderId = order?.id
@ -119,11 +122,7 @@ class UserActionService(
memberPointRepository.save(
MemberPoint(
memberId = memberId,
point = if (actionType == ActionType.ORDER_CONTENT_COMMENT && order != null) {
order.can
} else {
policy.pointAmount
},
point = point,
actionType = actionType,
expiresAt = now.plusDays(3)
)
@ -132,15 +131,12 @@ class UserActionService(
if (pushTokenList.isNotEmpty()) {
fcmService.sendPointGranted(
pushTokenList,
if (actionType == ActionType.ORDER_CONTENT_COMMENT && order != null) {
order.can
} else {
policy.pointAmount
}
point
)
}
}
}
}
} catch (e: Exception) {
logger.warn("포인트 지급 또는 알림 실패: ${e.message}")
}