Skip to content

Conversation

@sangyunpark99
Copy link
Collaborator

작업 내용

  • UserSelectResponseDto, UserSelectByEmailRequestDto 구현
  • UserController에 회원 조회 API 추가
  • GET /api/v1/users/{id}: ID 기반 조회
  • POST /api/v1/users/email: Email 기반 조회
  • UserService에 ID, Email 기반 조회 로직 구현
  • UserMapper에서 Entity → DTO 변환 처리
  • 존재하지 않는 회원 조회 시 UserNotFoundException 발생

추가 사항

  • ExceptionMessages로 예외 메시지 상수화
  • ValidationMessages로 이메일 유효성 검증 메시지 상수화
  • GlobalExceptionHandler에 UserNotFoundException 처리 추가
  • 통합 테스트 UserQueryIntegrationTest 작성 및 성공 검증
  • 단위 테스트 UserServiceTest, UserControllerTest 작성 및 성공 검증

관련 이슈

대부분의 엔티티에 공통으로 사용되는 createdAt, updatedAt 필드를 추상 클래스 BaseEntity로 분리하여재사용할 수 있도록 구성했습니다.
회원의 주소 정보를 나타내는 엔티티입니다.

@Transactional(readOnly = true)
public UserSelectResponseDto findUserById(final Long userId) {
User user = jpaUserRepository.findById(userId).orElseThrow(() -> new UserNotFoundException(EXCEPTION_NOT_FOUND_USER.message()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

return jpaUserRepository.findById(userId).map(s-> userMapper.toUserSelectResponseDto(s)).orElseThrow(() -> new UserNotFoundException(EXCEPTION_NOT_FOUND_USER.message()));

sangyunpark99 and others added 25 commits April 4, 2025 08:26
모든 엔티티가 전부 사용하지 않기때문에, 필드 값으로 따로 명시
feat: 사용자 회원가입 기능 구현
@sangyunpark99 sangyunpark99 merged commit 5267a3d into develop Apr 7, 2025
1 check passed
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.

3 participants