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

[BE] feat: 하이라이트 추가 및 수정 API 구현 #813

Merged
merged 39 commits into from
Oct 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c62884c
feat: 하이라이트 기능을 위한 도메인, 테이블, 레포지토리 생성
skylar1220 Oct 9, 2024
5979829
refactor: reviewRequestCode도 서비스에 함께 넘기도록 수정
skylar1220 Oct 9, 2024
fa5aa38
feat: 하이라이트 수정을 위한 삭제, 저장 로직 구현
skylar1220 Oct 9, 2024
b55df2f
feat: 하이라이트 수정을 위한 검증 로직 구현
skylar1220 Oct 10, 2024
cbbc950
db: 하이라이트 조회 성능과 동시성을 위한 복합 인덱스 추가
skylar1220 Oct 10, 2024
84898cf
fix: 리뷰 그룹으로 질문 검증하는 로직 수정
skylar1220 Oct 10, 2024
2b74e5e
refactor: 레포지토리에 기존에 있던 메서드 활용하도록 수정
skylar1220 Oct 10, 2024
eb1459e
fix: 테이블명 오류 수정
skylar1220 Oct 10, 2024
f4418cc
refactor: 초기화시 필드 순서 수정
skylar1220 Oct 10, 2024
921cc6e
test: 하이라이트 레포지토리 테스트 추가
skylar1220 Oct 10, 2024
b3a58c3
test: 하이라이트 입력 검증 테스트 추가
skylar1220 Oct 10, 2024
a88d090
test: 하이라이트 수정 기능 서비스 테스트 추가
skylar1220 Oct 10, 2024
b8ce456
refactor: 생성자 파라미터 및 필드 순서 변경
skylar1220 Oct 10, 2024
ad59c37
fix: not null 설정 오타 수정
skylar1220 Oct 10, 2024
f87efad
refactor: 검증 순서 변경
skylar1220 Oct 10, 2024
d3abfd3
refactor: jpa 기본 메서드로 쿼리 여러개 나가는 부분을 @Query로 변경
skylar1220 Oct 10, 2024
95cf051
style: 개행 수정
skylar1220 Oct 10, 2024
bb9ebb1
refactor: 에러 메세지 수정
skylar1220 Oct 10, 2024
c700e45
db: 하이라이트 인덱스 관련 데이터 타입 int로 수정
skylar1220 Oct 10, 2024
834d900
refactor: 하이라이트 표시 위치 관련 속성을 객체로 분리
skylar1220 Oct 10, 2024
16f5d34
refactor: JPQL로 변경
skylar1220 Oct 10, 2024
f71d9de
refactor: 기존 레포지토리 메서드를 사용하도록 변경
skylar1220 Oct 10, 2024
4b28bd4
refactor: 메서드 네이밍 수정
skylar1220 Oct 10, 2024
cd6a16c
refactor: 하이라이트 위치 속성 객체에 추가 설정
skylar1220 Oct 10, 2024
fbd8fc4
refactor: 하이라이트 엔티티에서 reviewGroupId, questionId 필드 제거
skylar1220 Oct 10, 2024
1ce93e6
refactor: 기존 하이라이트 제거를 answerId를 통해 하도록 변경
skylar1220 Oct 10, 2024
ba72762
test: 책임을 이동한 테스트 제거 및 테스트 오류 수정
skylar1220 Oct 10, 2024
1c16507
db: 테이블에 questionId, review_group_id 컬럼 제거 반영
skylar1220 Oct 10, 2024
a7f25b8
refactor: 기존 중복 요청 메서드 제거
skylar1220 Oct 10, 2024
52c350b
refactor: 중복 요청의 경우 하나만 저장하도록 EqualsAndHashCode 재정의
skylar1220 Oct 10, 2024
7e546aa
refactor: 하이라이트 저장시 순서 보장 적용
skylar1220 Oct 10, 2024
55895db
refactor: HighlightPosition 검증, 객체 생성 후 하이라이트 객체 생성하도록 변경
skylar1220 Oct 10, 2024
aaf1c6c
refactor: 엔티티의 equals 조건 id로 복원 및 중복 제거 로직 삭제
skylar1220 Oct 11, 2024
560faec
refactor: HighlightPosition 객체 생성 위치 생성자 내로 이동
skylar1220 Oct 11, 2024
a3a968f
refactor: 예외명 수정
skylar1220 Oct 11, 2024
c226e21
refactor: 하이라이트 인덱스의 검증 추가
skylar1220 Oct 11, 2024
132ff57
refactor: 양수 검증 메서드명 수정
skylar1220 Oct 11, 2024
a9ceb36
test: 필드에 접근 제어자 추가
skylar1220 Oct 11, 2024
24b706b
fix: 하이라이트 줄 번호 계산 로직 및 변수명 수정
skylar1220 Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class HighlightController {
@PostMapping("/v2/highlight")
public ResponseEntity<Void> highlight(@Valid @RequestBody HighlightsRequest request,
@SessionAttribute("reviewRequestCode") String reviewRequestCode) {
highlightService.highlight(request);
highlightService.highlight(request, reviewRequestCode);
Copy link
Contributor

Choose a reason for hiding this comment

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

리뷰 컨트롤러처럼 개행을 맞추면 어떨까요?

    @GetMapping("/v2/reviews/{id}")
    public ResponseEntity<ReviewDetailResponse> findReceivedReviewDetail(
            @PathVariable long id,
            @SessionAttribute("reviewRequestCode") String reviewRequestCode
    ) {
        ReviewDetailResponse response = reviewDetailLookupService.getReviewDetail(id, reviewRequestCode);
        return ResponseEntity.ok(response);
    }

return ResponseEntity.ok().build();
Comment on lines +24 to 25
Copy link
Contributor

Choose a reason for hiding this comment

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

커밋 순서가,, 서비스 변경 사항은 포함돼있지 않았네요 😢

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아차차😂

}
}