Skip to content
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

Merged
merged 16 commits into from
Dec 25, 2022
Merged

[Prototype] 타이틀 획득 프로토타입 #175

merged 16 commits into from
Dec 25, 2022

Conversation

Youhoseong
Copy link
Collaborator

  1. 인사이트 게시물 업로드 횟수 관련 타이틀 획득 프로토타입
  • api ->statistics 이벤트 발행
  • statistics 이벤트 처리 및 집계
  • statistics -> push 타이틀 획득 이벤트 발행
  • push -> user 커넥션 기반 이벤트 푸시
  1. 기타 폴더링 정리

Copy link
Collaborator

@heoboseong7 heoboseong7 left a 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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

래퍼 클래스간의 비교인데 == 연산으로 문제없을까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~128 < < 128은 primitive로 캐싱된 값 사용해서 괜찮아요

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 그러면 문제없겠네요 굿굿

Comment on lines 28 to 32
StringBuilder sb = new StringBuilder();
sb.append(TitleCategory.INSIGHT);
sb.append("-");
sb.append(userId);
return new String(sb);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

내부에서 StringBuilder로 변환해줘서 + 연산자로 해도 문제없을 것 같아요

Suggested change
StringBuilder sb = new StringBuilder();
sb.append(TitleCategory.INSIGHT);
sb.append("-");
sb.append(userId);
return new String(sb);
return TitleCategory.INSIGHT + "-" + userId;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일부러 안쓰긴했는데.. 바꿨어요ㅎ

Comment on lines 10 to 11
public Long id;
public Long standard;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 모르니 값을 바꾸지 못하도록 private + getter 또는 final 키워드를 사용해야할 것 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고쳤어요

@Youhoseong
Copy link
Collaborator Author

Youhoseong commented Dec 24, 2022

FileChanged 47개라 놀랐네요...

거슬리는걸 정리하다보니ㅎㅎ

지금 api호출 유저로 이벤트받는 유저가 고정되어있는데요 (TitleEventPublishAspect)
aspect에서 이 값을 어찌 설정할지 고민좀 같이 해봐주세요~ 저도 생각해볼게요


TitleEventPublish titleEventPublish = method.getAnnotation(TitleEventPublish.class);

KeeweTitleHeader header = KeeweTitleHeader.of(titleEventPublish.titleCategory(), String.valueOf(SecurityUtil.getUserId()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분이 어떤 유저가 이벤트를 받을지를 결정하는 부분이죠??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞아요

Copy link
Collaborator

@heoboseong7 heoboseong7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고많으셨습니다~~

Copy link
Collaborator

@kimyoungi99 kimyoungi99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생추

@Youhoseong Youhoseong merged commit ca63340 into main Dec 25, 2022
@Youhoseong Youhoseong deleted the issue-#173 branch February 26, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Prototype] 타이틀 획득 프로토타입
3 participants