Skip to content

Commit

Permalink
[REFACT] 이벤트 기반 업적 달성 시스템 리팩토링 (#338)
Browse files Browse the repository at this point in the history
* [REFACT] 업적 이력 및 업적 달성, 알림 이벤트에 대한 Event DTO 클래스 리팩토링

* [REFACT] '프로젝트 생성' 작업에 대한 이벤트 발행 처리 로직 리팩토링

* [REFACT] 유저의 이력 처리, 업적의 달성 체크, 업적 달성 알림에 대한 이벤트 구독 처리 핸들러 리팩토링

* [REFACT] 불필요한 클래스 제거

* [RENAME] 이벤트 발행을 위한 VO 클래스 패키지 이동

* [REFACT] 업적 이력, 달성 여부 체크, 달성 알림 이벤트에 대한 핸들러 리팩토링

* [REFACT] 연속 달성 업적을 위한 progressCount 조회 메서드 추가 구현

* [REFACT] 업적 이력 및 달성 처리를 위한 Helper 클래스 구현

* [REFACT] AOP 제거 및 새로운 트랜잭션의 업적 헬퍼 클래스 호출

* [REFACT] 한 번에 업적 달성 가능한 업적에 대한 Count 조회 시, Null 핸들링 로직 구현

* [FIX] 제거된 메서드를 다른 메서드로 대체

* [FIX] 제거된 메서드를 다른 메서드로 대체
  • Loading branch information
JIN-076 authored Jun 9, 2024
1 parent 5870430 commit 1fa86d4
Show file tree
Hide file tree
Showing 28 changed files with 747 additions and 838 deletions.
182 changes: 0 additions & 182 deletions src/main/java/io/oeid/mogakgo/common/aop/AchievementEventAspect.java

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions src/main/java/io/oeid/mogakgo/common/event/AchievementEvent.java

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/java/io/oeid/mogakgo/common/event/UserActivityEvent.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.oeid.mogakgo.common.event.domain.vo;

import io.oeid.mogakgo.domain.achievement.domain.entity.enums.ActivityType;
import lombok.Builder;
import lombok.Getter;

@Getter
public class AchievementCompletionEvent extends Event {

private final Object target;

@Builder
private AchievementCompletionEvent(Long userId, ActivityType activityType, Object target) {
super(userId, activityType);
this.target = target;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.oeid.mogakgo.common.event.domain.vo;

import io.oeid.mogakgo.domain.achievement.domain.entity.enums.ActivityType;
import lombok.Builder;
import lombok.Getter;

@Getter
public class AchievementNotificationEvent extends Event {

private final Object target;

@Builder
private AchievementNotificationEvent(Long userId, ActivityType activityType, Object target) {
super(userId, activityType);
this.target = target;
}
}
15 changes: 15 additions & 0 deletions src/main/java/io/oeid/mogakgo/common/event/domain/vo/Event.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.oeid.mogakgo.common.event.domain.vo;

import io.oeid.mogakgo.domain.achievement.domain.entity.enums.ActivityType;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor(access = AccessLevel.PROTECTED)
public abstract class Event {

protected Long userId;
protected ActivityType activityType;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package io.oeid.mogakgo.common.event.domain.vo;

import io.oeid.mogakgo.domain.achievement.domain.entity.enums.ActivityType;
import lombok.Builder;
import lombok.Getter;

@Getter
public class UserActivityEvent extends Event {

@Builder
private UserActivityEvent(Long userId, ActivityType activityType) {
super(userId, activityType);
}

}
Loading

0 comments on commit 1fa86d4

Please sign in to comment.