-
Notifications
You must be signed in to change notification settings - Fork 0
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
[refactor #193] 채팅 요청 상태 업데이트 함수 수정 #194
Conversation
Code Coverage
|
Test Results 28 files 28 suites 15s ⏱️ Results for commit dbb9e4f. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
더욱 읽기 편해졌네요!
@@ -4,13 +4,13 @@ | |||
import com.dnd.gongmuin.member.domain.Member; | |||
import com.querydsl.core.annotations.QueryProjection; | |||
|
|||
public record RejectedChatInquiryDto( | |||
public record ExpiredChatInquiryDto( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
더 정확한 네이밍이네요!
queryFactory.update(chatInquiry) | ||
.set(chatInquiry.status, InquiryStatus.REJECTED) | ||
.set(chatInquiry.updatedAt, now) | ||
.where( | ||
chatInquiry.createdAt.loe(LocalDateTime.now().minusWeeks(1)), | ||
chatInquiry.status.eq(InquiryStatus.PENDING) | ||
chatInquiry.id.in(expiredChatInquiryIds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
조건절을 개선해서 속도가 더욱 빨라지겠네요 👍
* [rename] : DTO 이름 변경 * [refactor] : 만료된 채팅 요청 아이디를 비교해 상태 변경하도록 수정 * [test] : 아이디를 비교해 상태 변경하도록 수정 -> 테스트 반영 * [refactor] : 스케줄러 함수명 변경 * [feat] : 만료된 채팅 요청 아이디로 벌크 연산 호출 * [test] : 만료된 채팅 요청 아이디로 벌크 연산 -> 테스트 반영 * [refactor] : 로직 변경으로 불필요해진 repository 함수 제거
* [feat #191] 인증/인가 문제 확인을 위한 에러 로그 임시 추가 * [chore #191] 인증/인가 임시 로그 추가를 위한 CD 스크립트 수정 * [refactor #193] 채팅 요청 상태 업데이트 함수 수정 (#194) * [rename] : DTO 이름 변경 * [refactor] : 만료된 채팅 요청 아이디를 비교해 상태 변경하도록 수정 * [test] : 아이디를 비교해 상태 변경하도록 수정 -> 테스트 반영 * [refactor] : 스케줄러 함수명 변경 * [feat] : 만료된 채팅 요청 아이디로 벌크 연산 호출 * [test] : 만료된 채팅 요청 아이디로 벌크 연산 -> 테스트 반영 * [refactor] : 로직 변경으로 불필요해진 repository 함수 제거 * [fix #190] 답변자가 스스로에게 채팅 요청 보낼 수 없도록 수정 (#192) * [feat] : 채팅 요청 에러 코드 추가 * [feat] : 채팅 요청 에러 검증 로직 추가 * [test] : 채팅 요청 에러 검증 로직 테스트 * [refactor] : 검증 로직 함수 추출 * [chore #191] 인증/인가 임시 로그 추가를 위한 CD 스크립트 수정 * [fix #191] 임시 로그 문법 오류 수정 * [fix #191] JWT 관련 임시 로그 추가 * [feat #191] 임시 stackTrace 로그 제거 * [feat #191] 쿠키 설정 변경 * [fix #191] 쿠키 SameSite 설정 원상복구 * [feat #191] 쿠키 samesite None -> Strict 변경 * [fix #191] 쿠키 도메인 설정 하위 도메인 . 제거 * [feat #191] 통일된 DNS front domain allow-origins 추가 * [chore #191] 오류 해결 후 cd_dev 스크립트 원복 * [fix #191] 쿠키 에러 확인을 위한 임시 로그 제거 --------- Co-authored-by: Son Gahyun <[email protected]>
관련 이슈
📑 작업 상세 내용
네이밍 변경
RejectedChatInquiryDto
->ExpiredChatInquiryDto
기존 로직) 상태 비교, createdAt으로 비교
-> 만료된 채팅 아이디 리스트만 비교하도록 수정
크레딧 반환하고, credit 기록하는 로직 함수로 추출
불필요한 repository 코드 삭제
💫 작업 요약
🔍 중점적으로 리뷰 할 부분