-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Prototype] 타이틀 획득 프로토타입 #175
Conversation
Youhoseong
commented
Dec 24, 2022
- 인사이트 게시물 업로드 횟수 관련 타이틀 획득 프로토타입
- api ->statistics 이벤트 발행
- statistics 이벤트 처리 및 집계
- statistics -> push 타이틀 획득 이벤트 발행
- push -> user 커넥션 기반 이벤트 푸시
- 기타 폴더링 정리
- close [Prototype] 타이틀 획득 프로토타입 #173
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileChanged 47개라 놀랐네요...
@Override | ||
protected Optional<InsightTitle> getAcquiredTitleOps(Long target) { | ||
return Arrays.stream(InsightTitle.values()) | ||
.filter(it -> it.standard == target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
래퍼 클래스간의 비교인데 == 연산으로 문제없을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~128 < < 128은 primitive로 캐싱된 값 사용해서 괜찮아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 그러면 문제없겠네요 굿굿
StringBuilder sb = new StringBuilder(); | ||
sb.append(TitleCategory.INSIGHT); | ||
sb.append("-"); | ||
sb.append(userId); | ||
return new String(sb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
내부에서 StringBuilder로 변환해줘서 + 연산자로 해도 문제없을 것 같아요
StringBuilder sb = new StringBuilder(); | |
sb.append(TitleCategory.INSIGHT); | |
sb.append("-"); | |
sb.append(userId); | |
return new String(sb); | |
return TitleCategory.INSIGHT + "-" + userId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일부러 안쓰긴했는데.. 바꿨어요ㅎ
public Long id; | ||
public Long standard; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 모르니 값을 바꾸지 못하도록 private + getter 또는 final 키워드를 사용해야할 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고쳤어요
거슬리는걸 정리하다보니ㅎㅎ 지금 api호출 유저로 이벤트받는 유저가 고정되어있는데요 (TitleEventPublishAspect) |
|
||
TitleEventPublish titleEventPublish = method.getAnnotation(TitleEventPublish.class); | ||
|
||
KeeweTitleHeader header = KeeweTitleHeader.of(titleEventPublish.titleCategory(), String.valueOf(SecurityUtil.getUserId())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이부분이 어떤 유저가 이벤트를 받을지를 결정하는 부분이죠??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고많으셨습니다~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생추