Skip to content

Commit b9b2d3a

Browse files
committed
feat: 사용자 행동 상태 로깅
1 parent 9cbb99c commit b9b2d3a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

apps/commerce-api/src/main/java/com/loopers/application/event/product/ProductEventHandler.java renamed to apps/commerce-api/src/main/java/com/loopers/application/event/useraction/UserActionLogEventHandler.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
package com.loopers.application.event.product;
1+
package com.loopers.application.event.useraction;
22

3-
import com.loopers.application.product.ProductLookedUpEvent;
3+
import com.loopers.application.product.UserActionEvent;
44
import com.loopers.domain.actionlog.UserActionLog;
55
import com.loopers.infrastructure.actionlog.UserActionLogJpaRepository;
66
import lombok.RequiredArgsConstructor;
@@ -12,14 +12,13 @@
1212

1313
@Component
1414
@RequiredArgsConstructor
15-
public class ProductEventHandler {
15+
public class UserActionLogEventHandler {
1616
private final UserActionLogJpaRepository userActionLogJpaRepository;
1717

1818
@Transactional(propagation = Propagation.REQUIRES_NEW)
1919
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
20-
public void onProductLookedUp(ProductLookedUpEvent event) {
20+
public void onUserAction(UserActionEvent event) {
2121
UserActionLog userActionLog = UserActionLog.create(event);
2222
userActionLogJpaRepository.save(userActionLog);
23-
2423
}
2524
}

0 commit comments

Comments
 (0)