Skip to content

[Feat] #692 [FEAT] SOPT Makers Chapter 추가에 따른 SoptPart 수정 및 SoptampUser 생성 로직 보완#695

Open
jher235 wants to merge 4 commits intodevfrom
feat/#692
Open

[Feat] #692 [FEAT] SOPT Makers Chapter 추가에 따른 SoptPart 수정 및 SoptampUser 생성 로직 보완#695
jher235 wants to merge 4 commits intodevfrom
feat/#692

Conversation

@jher235
Copy link
Member

@jher235 jher235 commented Mar 11, 2026

Related issue 🛠

Work Description ✏️

  • 플랫폼에서 받아오는 activity history에 SOPT Makers Chapter 정보가 추가됨. 이에 맞춰 SoptPart 수정
  • 추가된 데이터는 아래와 같음
    • AS-IS
      “웹”, “iOS”, “기획“, “서버“, “디자인“, “안드로이드”
    • TO-BE
      “웹”, “iOS”, “기획“, “서버“, “디자인“, “안드로이드“, “PM”, “프론트엔드“, “백엔드“, “마케터“, “리서처“, “오거나이저“, “CX”
  • SoptampUser 생성 시 네트워크를 불필요하게 중복해서 타던 로직 리팩토링
    • getStatus() 메서드를 오버로딩하여 기존 로직에 영향 최소화함
  • 인증서버에서 내려주는 isSopt 값을 받아서 사용하도록 함
  • SOPT와 SOPT Makers 활동을 동시에 하는 경우에도 정상적으로 솝탬프 유저가 생성되도록 로직 보완

Trouble Shooting ⚽️

Related ScreenShot 📷

Uncompleted Tasks 😅

To Reviewers 📢

@jher235 jher235 requested a review from kyoooooong March 11, 2026 11:13
@jher235 jher235 self-assigned this Mar 11, 2026
@jher235 jher235 added ✨ Feat 새로운 피쳐 생성 🔨 Refactor 코드 개선 labels Mar 11, 2026
Copy link

@kyoooooong kyoooooong left a comment

Choose a reason for hiding this comment

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

너무 멋진 PR인 것같습니다 ... 👍 수고 너무너무너무 많으셨습니다!!

if (soptActivities == null || soptActivities.isEmpty()) return 0;

return soptActivities.stream()
.filter(SoptActivities::isSopt)

Choose a reason for hiding this comment

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

요 부분 위에선 '.filter(a -> Boolean.TRUE.equals(a.isSopt()))' 으로 처리되어있는데 이부분에선 안되어있어서 NPE가 날 수 있을 것같아 혹시 통일하는 방향은 어떠실까요..?

Copy link
Member Author

Choose a reason for hiding this comment

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

좋은데요?? 바로 반영하겠습니다~~ 💯


// TODO : 추후 유저 생성 api response 변경해 생성 api 쪽에서 soptamp user upsert 하도록 변경
PlatformUserInfoResponse platformUserInfo = platformService.getPlatformUserInfoResponse(userId);
UserStatus status = platformService.getStatus(platformUserInfo);

Choose a reason for hiding this comment

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

오호 platformUserInfo를 한 번 조회한 뒤 status 계산에 재사용하도록 바뀐 걸까요? 어떤 변화였을지 궁금합니다! 우선 좋아보여요,,,, 😍

Copy link
Member Author

@jher235 jher235 Mar 11, 2026

Choose a reason for hiding this comment

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

맞아요! 기존에

  1. getStatus 메서드가 userId를 받아서 유저를 조회한 뒤 UserStatus를 반환함.
  2. 이후 getPlatformUserInfoResponse(userId) 로 유저 정보를 다시 가져와서 사용함

이런 흐름이어서

  1. getStatus 메서드를 PlatformUserInfoResponse 를 파라미터로 받는 형태와
  2. userId로 받았을 경우 PlatformUserInfoResponse 를 조회해서 내부적으로 getStatus를 호출하는 경우

로 분리했어요. 미세한 오버헤드가 있을 수 있지만, 기존 동작을 잘 유지하고 현재 상황에서 효율적이라고 생각했습니다~

- 내부 메서드를 통해서 동작 보장 및  메서드 참조를 통한 가독성 향상이 가능할 것으로 기대
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 피쳐 생성 🔨 Refactor 코드 개선 size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] SOPT Makers Chapter 추가에 따른 SoptPart 수정 및 SoptampUser 생성 로직 보완

2 participants