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] Round 업데이트 로직 수정 #591

Merged
merged 2 commits into from
Oct 31, 2023
Merged

[BE] Round 업데이트 로직 수정 #591

merged 2 commits into from
Oct 31, 2023

Conversation

yujamint
Copy link
Member

😋 작업한 내용

  • Round가 예상 날짜보다 하루 일찍 업데이트되는 것을 수정했습니다.

🙏 PR Point

  • 로직 변화는 매우 간단합니다. endDate가 하루 전인 라운드들을 업데이트합니다.
  • 기존에 변경된 주차를 검증하는 Then 절의 로직이 주석 처리돼 있더라고요. 아마 StudyDetailResponse에는 주차 정보가 들어 있지 않기 때문에 임시로 처리됐던 것 같습니다. 스터디 인증 조회에 담겨 있는 weekNumber를 통해 검증하도록 수정했습니다.
  • 일요일에 진행되는 round가 경계값이라고 생각하여 이에 대한 테스트를 작성했습니다.

👍 관련 이슈

Copy link
Collaborator

@poi1649 poi1649 left a comment

Choose a reason for hiding this comment

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

빠른 대응 좋습니다. 이게 애자일이죠 어프루부하겠습니다.

@@ -207,8 +207,8 @@ public int sizeOfCurrentMembers() {
.count();
}

public boolean isCurrentRoundEndAt(LocalDate today) {
return getCurrentRound().isEndAt(today);
public boolean isCurrentRoundEndAt(LocalDate yesterday) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

디테일 매우 훌륭합니다.

Copy link
Member Author

@yujamint yujamint Oct 30, 2023

Choose a reason for hiding this comment

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

근데 궁금한 게 생겼어요.
현재 우리는 'endAt이 오늘인 라운드를 바로 종료시키지 않고, 하루 더 진행시킬 거야. 그러므로 어제가 endAt인 라운드를 종료시키자.' 라는 목적을 가지고 있습니다. 그런 목적 하에 로직을 짰고요.
근데 과연 Study 객체 입장에서도 yesterday 라는 맥락에 대해 알아도 괜찮은지 의문이 생겼습니다..

이게 사실 날짜를 매개변수로 받는 이유는 테스트 때문이었던 것 같은데, 서비스에서 날짜를 '어제 날짜'로 넣어주고 있다고 해서 매개변수명 역시 'yesterday'인 게 맞을까 싶네요.. 어떻게 생각하시나요??

@poi1649

Copy link
Collaborator

Choose a reason for hiding this comment

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

오. 민트의 의견대로 현재 메서드 이름이 isEndAt인 지금은 확실히 어색하다고 느껴지네요. 오히려 datetime 정도로 바꿔도 괜찮을 것 같습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

동의합니다. 그럼 오늘 집 가서 수정할게요 ㅋㅋ

Copy link
Member Author

Choose a reason for hiding this comment

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

date로 수정했습니다. 머지할게요~

@github-actions
Copy link

github-actions bot commented Oct 30, 2023

Test Results

111 tests  +2   111 ✔️ +2   14s ⏱️ -5s
  22 suites ±0       0 💤 ±0 
  22 files   ±0       0 ±0 

Results for commit 6791940. ± Comparison against base commit f68d536.

♻️ This comment has been updated with latest results.

@@ -32,6 +37,34 @@ public StudyProgressStep(SharedContext sharedContext) {
.extract();
}

@Given("이번주 일요일이 됐다.")
Copy link
Member Author

Choose a reason for hiding this comment

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

이쪽 코드에 하드코딩을 좀 때려넣었습니다.
일요일 -> 월요일이 주의해야할 경계값이라고 생각했고, 그에 대한 테스트를 짜다보니 이렇게 되더라고요 ㅋㅋ

Copy link
Member

@CFalws CFalws left a comment

Choose a reason for hiding this comment

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

민트가 말씀하신 부분들만 체크하시고 머지해도 될 거 같네요!
예비군 중에도 고생하셨어요!

Copy link
Collaborator

@kevstevie kevstevie left a comment

Choose a reason for hiding this comment

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

LGTM

@yujamint yujamint changed the title fix: Round 업데이트 로직 수정 [BE] Round 업데이트 로직 수정 Oct 31, 2023
@yujamint yujamint merged commit f35efc1 into BE/develop Oct 31, 2023
2 checks passed
@yujamint yujamint deleted the BE/fix/590 branch October 31, 2023 14:50
yujamint added a commit that referenced this pull request Nov 16, 2023
* refactor: 이벤트 제거 (#384)

* feat: 회차 멤버들의 투두 진행률 조회 api (#382)

* feat: 회차 진행률 계산 구현

* feat: CloudWatch Actuator 연동

* feat: CloudWatch Actuator tag 수정

* fix: 클라우드 와치 메트릭을 production 환경에서만 수집하게 변경

* chore: 프로메테우스 의존성 제거 (#392)

* feat: 스터디장이 탈퇴할 시 모집중인 스터디는 삭제하는 기능 구현 (#335)

* feat: 스터디장이 탈퇴할 시 모집중인 스터디는 삭제하는 기능 구현

* refactor: on delete 추가

* chore: flyway v7

* fix: conflict 해소

* test: scenario 위치 수정

* refactor: 이름 수정 및 flyway 쿼리 수정

* refactor: 트랜잭션 통합

* test: sharedcontext 기능 추가 (#387)

* test: sharedcontext 기능 추가

* refactor: 잔여 부분 수정

---------

Co-authored-by: Jae Min Yu <[email protected]>

* 토큰 만료 확인 기능 (#405)

* feat: 토큰 만료 확인 기능 구현

* fix: 테스트 변경 사항에 따른 버그 수정

* feat: 비회원 스터디 상세정보 조회 기능 구현 (#414)

* feat: 비회원 스터디 상세정보 조회 기능 구현

- 스터디 상세 조회 API에서 역할을 제공하지 않도록 수정
- 스터디 멤버 역할 조회 API 구현

* feat: 스터디멤버 역할 조회 API 스웨거 적용

* test: 테스트 코드 주석 제거

* refactor: Pattern 객체 상수화

* style: 개행 추가

* test: assertAll 사용하도록 수정

* QA 버전 배포 (#413)

* chore: 프로메테우스 의존성 제거 (#392)

* feat: 스터디장이 탈퇴할 시 모집중인 스터디는 삭제하는 기능 구현 (#335)

* feat: 스터디장이 탈퇴할 시 모집중인 스터디는 삭제하는 기능 구현

* refactor: on delete 추가

* chore: flyway v7

* fix: conflict 해소

* test: scenario 위치 수정

* refactor: 이름 수정 및 flyway 쿼리 수정

* refactor: 트랜잭션 통합

* test: sharedcontext 기능 추가 (#387)

* test: sharedcontext 기능 추가

* refactor: 잔여 부분 수정

---------

Co-authored-by: Jae Min Yu <[email protected]>

* 토큰 만료 확인 기능 (#405)

* feat: 토큰 만료 확인 기능 구현

* fix: 테스트 변경 사항에 따른 버그 수정

* feat: 비회원 스터디 상세정보 조회 기능 구현 (#414)

* feat: 비회원 스터디 상세정보 조회 기능 구현

- 스터디 상세 조회 API에서 역할을 제공하지 않도록 수정
- 스터디 멤버 역할 조회 API 구현

* feat: 스터디멤버 역할 조회 API 스웨거 적용

* test: 테스트 코드 주석 제거

* refactor: Pattern 객체 상수화

* style: 개행 추가

* test: assertAll 사용하도록 수정

---------

Co-authored-by: kevstevie <[email protected]>
Co-authored-by: Jae Min Yu <[email protected]>

* fix: flyway 수정 (#415)

* Revert "QA 버전 배포 (#413)" (#416)

This reverts commit 1bb1174.

* 티어 계산 및 경험치 계산 로직 구현 (#397)

* feat: 티어 계산 및 경험치 계산 로직 구현

* remove: study에서 최대 보상 계산하는 로직 제거

* refactor: 멤버가 성공적으로 진행한 라운드를 계산하는 기능을 스터디에게 부여

* fix: 없어진 괄호 복구

* test: 깨지는 테스트 수정

---------

Co-authored-by: kevstevie <[email protected]>

* 피드 기능을 구현한다. (#404)

* test: 피드 조회 기능 테스트 추가

* feat: 피드 조회 기능 추가

* feat: 일반 피드 작성 기능 추가

* feat: 피드 작성 / 조회 기능 추가

* fix: 배열로 시간 직렬화되는 버그 해결

* fix: 인증 및 피드 기능 분리

* Update backend/src/test/java/com/yigongil/backend/acceptance/steps/FeedSteps.java

Co-authored-by: Jae Min Yu <[email protected]>

* refactor: study service에서 피드를 찾도록 수정

* refactor: pagination에서 cursor를 이용하도록 변경

* fix: flyway추가

---------

Co-authored-by: Jae Min Yu <[email protected]>

* refactor: 티어 -> 경험치 flyway 쿼리 추가 (#428)

* refactor: 홈뷰 수정 (#430)

* refactor: 홈뷰 수정

* refactor: 매직 넘버 수정

* fix: flyway 언더바 수정

* fix: flyway 타입 수정

* refactor: 선택 투두 삭제 (#432)

* refactor: 선택 투두 삭제

* refactor: 투두 내용만 수정하게 변경 및 테스트 수정

* refactor: 피드 조회시에 스터디 이름도 반환 (#453)

* refactor: 피드 조회시에 스터디 이름도 반환

* Revert "refactor: 피드 조회시에 스터디 이름도 반환"

This reverts commit 34b4907.

* refactor: conflict 해소

* refactor: aop로 exception handler에서 slack 의존성 제거 (#442)

* refactor: aop로 exception handler에서 slack 의존성 제거

* refactor: slack 중복알림 해소

* feat: StudyV1, StudyV2 분리

* feat: Study 엔티티 수정

* fix: 스터디 엔티티 필드 추가

* refactor: PeriodUnit 제거

* 엔티티를 수정하며 발생한 컴파일 에러 해결 (#470)

* fix: totalRoundCount, periodOfRound 삭제에 따른 컴파일 에러 해결

* fix: 엔티티 수정에 따른 컴파일 에러 임시 해결

* refactor: swagger 설정 변경 (#452)

* refactor: swagger 설정 변경

* refactor: swagger url 설정 파일로 관리

* feat: 동적 쿼리를 통해 스터디 목록 필터링/정렬 (#475)

* feat: 동적 쿼리를 통해 스터디 목록 필터링/정렬

* refactor: config v1 prefix 제거

* refactor: 패키지 수정

* refactor: v1 prefix 제거

* refactor: status null 처리

* refactor: response 이름 수정

* refactor: param을 enum으로 컨버팅

* refactor: enum 순서 수정

* refactor: 메서드 추출

* fix: 스터디 시작 할 때 요일을 선택하도록 수정 (#473)

* feat: 스터디 개설 기능 구현 #468

* refactor: Study.startAt 제거 및 minimumWeeks와 meetingDaysCountPerWeek 추가

* fix: 스터디 목록 조회 API url 수정

* fix: 실패하는 스터디 일부 복구 및 주석 작성

* test: 실패하는 테스트 복구

* 스터디 상세조회 구현 & 멤버 인증 정보 조회 api 수정 (#484)

* refactor: 상세 조회 수정

* feat: 멤버 인증 정보 조회 응답 수정

* feat: 스터디 종료 기능 추가 (#483)

* fix: 과거 청산 및 새로운 시작 drop and restart (#490)

* feat: 지원한 스터디 목록 조회 기능 (#485)

* feat: 지원한 스터디 목록 조회 기능

* refactor: querydsl로 마이그래이션

* chore: 개행

* chore: 정렬 수정

* fix: conflict 해결 중 오류 수정 (#452)

* feat: 주차별 회차 조회 기능 추가 (#494)

* feat: 주차별 회차 조회 기능 추가

* refactor: 투두 -> 머스트두 변경, 생성 / 수정 통합

* Update backend/src/test/java/com/yigongil/backend/domain/round/RoundTest.java

* Update backend/src/test/java/com/yigongil/backend/domain/round/RoundTest.java

* fix: 마스터 탈퇴 시 정상적으로 스터디 삭제되게 수정 (#492)

* fix: flyway v12 이름 수정

* fix: flyway v12 ddl 수정

* fix: flyway v12 ddl 수정

* fix: swagger 설정 변경

* fix: swagger 설정 변경

* fix: swagger redirect

* Revert "fix: swagger redirect"

This reverts commit a1cfaa8.

* fix: swagger disable efault url

* fix: swagger 설정 변경

* fix: flyway v12 이름 수정

* fix: flyway v12 ddl 수정

* fix: flyway v12 ddl 수정

* fix: swagger 설정 변경

* fix: swagger 설정 변경

* fix: swagger redirect

* Revert "fix: swagger redirect"

This reverts commit a1cfaa8.

* fix: swagger disable efault url

* fix: swagger 설정 변경

* feat: graceful shutdown (#510)

Co-authored-by: Jae Min Yu <[email protected]>

* chore: datadog 의존성 추가

* feat: s3 이미지 업로드 기능 추가 (#464)

* feat: s3 이미지 업로드 기능 추가

* fix: 이미지 업로드 관련 빈이 로컬에서 로드되지 않도록 변경

* fix: url 수정

* fix: 스터디 멤버 삭제 로직을 study 안으로 이관 (#528)

* fix: s3 directory 설정 수정 (#521)

* feat: s3 이미지 업로드 기능 추가

* fix: 이미지 업로드 관련 빈이 로컬에서 로드되지 않도록 변경

* fix: url 수정

* fix: s3 directory 수정

* feat: 스터디 탈퇴 기능 (#526)

Co-authored-by: Bojun Kim <[email protected]>

* feat: 대기중인 스터디 조회 기능 구현 (#531)

Co-authored-by: Bojun Kim <[email protected]>

* refactor: 인증 조회 방식 수정 (#520)

* refactor: 인증 조회 방식 수정

* refactor: optional로 수정

---------

Co-authored-by: Bojun Kim <[email protected]>

* fix: collection에서 원소를 삭제하지 않도록 수정 (#537)

* fix: collection에서 원소를 삭제하지 않도록 수정 (#537)

* hotfix: 이미지 컨트롤러 url 매핑 수정 (#539)

* fix: collection에서 원소를 삭제하지 않도록 수정

* fix: ImageResourceController url매핑 수정

* hotfix 배포 (#540)

* fix: collection에서 원소를 삭제하지 않도록 수정 (#537)

* hotfix: 이미지 컨트롤러 url 매핑 수정 (#539)

* fix: collection에서 원소를 삭제하지 않도록 수정

* fix: ImageResourceController url매핑 수정

---------

Co-authored-by: Bojun Kim <[email protected]>

* fix : 홈에서 해당 스터디의 누적잔디 조회 가능 (#544)

* refactor: 누적 잔디 조회 기능 수정

* chore: todo 제거

* fix: 클라이언트 반환 이미지 경로 수정 (#546)

Co-authored-by: Bojun Kim <[email protected]>

* qa 버그 수정 버전 배포 (#548)

* fix: collection에서 원소를 삭제하지 않도록 수정 (#537)

* hotfix: 이미지 컨트롤러 url 매핑 수정 (#539)

* fix: collection에서 원소를 삭제하지 않도록 수정

* fix: ImageResourceController url매핑 수정

* fix : 홈에서 해당 스터디의 누적잔디 조회 가능 (#544)

* refactor: 누적 잔디 조회 기능 수정

* chore: todo 제거

* fix: 클라이언트 반환 이미지 경로 수정 (#546)

Co-authored-by: Bojun Kim <[email protected]>

---------

Co-authored-by: kevstevie <[email protected]>
Co-authored-by: Jae Min Yu <[email protected]>

* [BE] Round 업데이트 로직 수정 (#591)

* fix: Round 업데이트 로직 수정

* refactor: 매개변수명 수정

* [BE] refactor: 인증, 피드 최대 글자수 증가 (#599)

* refactor: 인증, 피드 최대 글자수 증가

* refactor: 피드 내용 nullable false 적용

---------

Co-authored-by: kevstevie <[email protected]>
Co-authored-by: bjk1649 <[email protected]>
Co-authored-by: kevstevie <[email protected]>
Co-authored-by: kim daehee <[email protected]>
Co-authored-by: kim dae hee <[email protected]>
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.

4 participants