Skip to content

Conversation

@huncozyboy
Copy link
Member

@huncozyboy huncozyboy commented Oct 18, 2025

Related issue 🛠

Work Description ✏️

  1. 현재 프로필 이미지를 가져오는 별도의 메서드가 SoptampUserFinder 내부에 존재하고 있지않아서,
    트래킹 해보니 SoptampUser 내부에 관련한 정보중에 profileImage가 없어 필드를 새로 추가를 해줘야하나 고민이 많았습니다….

하지만 데드라인이 얼마 남지않았고, 기존에 저장 되어있는 값들이 많은 SoptampUser 엔티티에 변경사항이 생기면 
조금 일이 커질거같아 일단은 보류하고, 
다른 파사드들을 확인해보니 이미 getPlatformUserInfoResponse를 호출해서 유저 정보를 받아오고 있었어서, SoptampFacade에서도 동일하게 적용하여 설계하였습니다

Pasted Graphic 8
  1. checkOwnedStamp라는 본인 미션 뷰에서만 박수친 사람 리스트를 조회할 수 있는 예외처리를 서버단에 추가해주어서,
    403을 던지도록 설계했는데 다른 예외처리들이 또 있을지 의견 주시면 좋을거같습니다

To Reviewers 📢

  1. Response 내부에서 중첩 Record로 선언 해주기보다는, static class로 선언한 다음 Lombok 어노테이션을 활용하고 있던 내용들이 컨벤션처럼 정해져있는거로 이해했습니다
    Record를 활용해주기 보다는, 기존에 static class로 선언해줬던 이유가 궁금했습니다

(아래 사진은 예시입니다)
image


  1. 페이지네이션은 기존에 구현되어 있는 애들이랑, 최대한 비슷한 형식으로 구현하려고 했는데 꼼꼼하게 봐주시면 감사하겠습니다 🙇‍♂️

@huncozyboy huncozyboy self-assigned this Oct 18, 2025
@huncozyboy huncozyboy linked an issue Oct 18, 2025 that may be closed by this pull request
Copy link
Member

@jher235 jher235 left a comment

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 40
default ClapResponse.ClapUserList of(Page<Clap> page, Map<Long, SoptampUserInfo> profileMap, Map<Long, String> imageMap) {
List<ClapResponse.ClapUserProfile> users = page.getContent().stream()
.map(clap -> {
var p = profileMap.get(clap.getUserId());

return new ClapResponse.ClapUserProfile(
p.getNickname(),
imageMap.getOrDefault(clap.getUserId(), ""),
p.getProfileMessage(),
clap.getClapCount()
);
})
.toList();
Copy link
Member

Choose a reason for hiding this comment

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

변수명이 조금 더 명확하면 좋을 것 같아요 ~ 이렇게 타입 추론을 쓸 때는 더더욱이요

Copy link
Collaborator

@hyerinhwang-sailin hyerinhwang-sailin left a comment

Choose a reason for hiding this comment

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

원래 프로필 이미지는 플랫폼에서 profileImage 가져오는 게 맞습니다!
소소한 리뷰 남겼으니 추후 반영 부탁드려요 고생하셨습니다👍

Comment on lines 146 to 150
@Transactional(readOnly = true)
public void checkOwnedStamp(Long stampId, Long userId) {
stampRepository.findByIdAndUserId(stampId, userId)
.orElseThrow(() -> new ForbiddenException(ErrorCode.CLAP_LIST_FORBIDDEN));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Transactional(readOnly = true)
public void checkOwnedStamp(Long stampId, Long userId) {
    var stamp = stampRepository.findById(stampId)
        .orElseThrow(() -> new NotFoundException(ErrorCode.STAMP_NOT_FOUND));
    if (!Objects.equals(stamp.getUserId(), userId)) {
        throw new ForbiddenException(ErrorCode.CLAP_LIST_FORBIDDEN);
    }
}

이런식으로 권한/존재 분리 체크하면 좋을 것 같아요!


Optional<Clap> findByUserIdAndStampId(Long userId, Long stampId);

Page<Clap> findAllByStampIdOrderByClapCountDescUpdatedAtDesc(Long stampId, Pageable pageable);
Copy link
Collaborator

Choose a reason for hiding this comment

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

CREATE INDEX IF NOT EXISTS idx_clap_stamp_sort
  ON clap (stamp_id, clap_count DESC, updated_at DESC);

정렬 자체는 좋지만 인덱스가 없으면 성능 이슈가 생길 수 있을 것 같아요! 리뷰처럼 db 인덱스 추가 하면 좋을 듯합니다~

@huncozyboy huncozyboy merged commit c2bca9b into dev Oct 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 솝탬프 박수 친 유저 목록 조회

3 participants