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

[NO_JIRA] 블록별 좌석 범위 조회 API request 수정 #43

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

EunjiShin
Copy link
Collaborator

📌 개요 (필수)


🔨 작업 사항 (필수)

  • controller 변경
  • 그에 맞춰 서비스, 레포지토리 구현 변경
  • fake test 추가

💻 실행 화면 (필수)

  • 변경된 spec
스크린샷 2024-07-18 오후 4 30 40
  • 성공
스크린샷 2024-07-18 오후 4 36 47
  • 존재하지 않는 경기장
스크린샷 2024-07-18 오후 4 36 20
  • 존재하지 않는 블럭 코드
스크린샷 2024-07-18 오후 4 36 34

@EunjiShin EunjiShin added the ✨ Feature 기능 개발 label Jul 18, 2024
@EunjiShin EunjiShin self-assigned this Jul 18, 2024
Copy link

github-actions bot commented Jul 18, 2024

Test Results

39 tests  ±0   39 ✅ ±0   0s ⏱️ ±0s
14 suites ±0    0 💤 ±0 
14 files   ±0    0 ❌ ±0 

Results for commit d87d477. ± Comparison against base commit 952a226.

♻️ This comment has been updated with latest results.


import org.depromeet.spot.jpa.block.entity.BlockEntity;
import org.springframework.data.jpa.repository.JpaRepository;

public interface BlockJpaRepository extends JpaRepository<BlockEntity, Long> {
Optional<BlockEntity> findByStadiumIdAndCode(Long stadiumId, String code);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

블럭 코드는 경기장 내에서만 unique하기 때문에, stadiumId를 추가로 이용했어요~

Comment on lines +52 to +57
@Override
public List<BlockRow> findAllByStadiumAndBlock(Long stadiumId, String blockCode) {
List<BlockRowEntity> entities =
blockRowJpaRepository.findAllByStadiumAndBlock(stadiumId, blockCode);
return entities.stream().map(BlockRowEntity::toDomain).toList();
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

요건 생각해보니까, 어차피 로직상 stadiumId랑 code로 블럭을 먼저 찾을테니, 이후 blockId만 get해서 써도 되겠네요..!
이렇게 구현해도 딱히 문제는 없으니까 일단 현상 유지할게요~

@EunjiShin EunjiShin merged commit 8e44974 into main Jul 18, 2024
6 checks passed
@EunjiShin EunjiShin deleted the feat/NO_JIRA_block_info_api_res branch July 18, 2024 07:43
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.

1 participant