test #316

Merged
klaus merged 20 commits from test into main 2025-05-20 06:03:11 +00:00
5 changed files with 90 additions and 80 deletions
Showing only changes of commit d3ec13e6c0 - Show all commits

View File

@ -43,6 +43,7 @@ class AudioContentCommentController(
userActionService.recordAction(
memberId = member.id!!,
isAuth = member.auth != null,
actionType = ActionType.CONTENT_COMMENT,
contentCommentId = commentId,
pushTokenList = pushTokenList
@ -50,6 +51,7 @@ class AudioContentCommentController(
userActionService.recordAction(
memberId = member.id!!,
isAuth = member.auth != null,
actionType = ActionType.ORDER_CONTENT_COMMENT,
contentId = request.contentId,
contentCommentId = commentId,

View File

@ -65,6 +65,7 @@ class MemberController(
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)
@ -358,6 +359,7 @@ class MemberController(
if (response.isNew) {
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)
@ -393,6 +395,7 @@ class MemberController(
if (response.isNew) {
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)

View File

@ -40,6 +40,7 @@ class AuthController(
val pushTokenList = memberService.getPushTokenList(recipient = memberId)
userActionService.recordAction(
memberId = member.id!!,
isAuth = true,
actionType = ActionType.USER_AUTHENTICATION,
pushTokenList = pushTokenList
)

View File

@ -27,6 +27,7 @@ class UserActionController(
val pushTokenList = memberService.getPushTokenList(recipient = memberId)
service.recordAction(
memberId = memberId,
isAuth = member.auth != null,
actionType = request.actionType,
pushTokenList = pushTokenList
)

View File

@ -31,6 +31,7 @@ class UserActionService(
fun recordAction(
memberId: Long,
isAuth: Boolean,
actionType: ActionType,
contentId: Long? = null,
contentCommentId: Long? = null,
@ -49,6 +50,7 @@ class UserActionService(
repository.flush()
}
if (isAuth) {
try {
transactionTemplate.execute {
val policy = policyRepository.findByActionTypeAndIsActiveTrue(actionType, now)
@ -142,6 +144,7 @@ class UserActionService(
}
}
}
}
companion object {
private val logger = LoggerFactory.getLogger(UserActionService::class.java)