From 1b10d21dfa4af5267270a7736170576206fb55f7 Mon Sep 17 00:00:00 2001 From: Son Chanhyeok <127181634+hyeokson@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:30:11 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=EA=B8=B0=EB=8C=80=ED=8F=89=EC=9D=B4=20?= =?UTF-8?q?=EA=B1=B0=EA=BE=B8=EB=A1=9C=20=EC=A1=B0=ED=9A=8C=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EB=B0=9C=EC=83=9D=20(#197)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Infra] CI/CD test (#42) * infra: 빌드 테스트 yml 작성 * infra: DB 정보 추가 * infra: ssh-agent 버전 변경 * infra: known_hosts 추가 * infra: db port 변경 * infra: database test 설정 변경 * infra: DB 환경변수 설정 및 application.yml 생성 * infra: application.yml 동적 생성 스크립트 수정 * infra: 레디스 설정 추가 * infra: redis test 추가 * infra: redis 버전 변경 * infra: redis cli 설치 * infra: application.yml 위치 및 내용 확인 * infra: Github Actions 환경변수에 REDIS_HOST, REDIS_PORT 추가 * infra: 환경변수 확인 추가 * infra: zip file 만들기 추가, AWS credentials 추가 * infra: 환경변수 이름 변경 - ARN -> AWS_ARN * infra: s3 bucket에 업로드 추가 * infra: code deploy 추가 * infra: code deploy 수정 * infra: code deploy 수정 * infra: appspec.yml 작성 * infra: application.yml 생성 경로 변경 * infra: application.yml 확인 스크립트 삭제 * infra: application.yml 생성 스크립트 수정 * infra: application-prod.yml 추가 * infra: appspec.yml 수정, 배포를 위한 sh파일 추가 * infra: deploy.yml 이름 변경 - test_deploy -> deploy * infra: body = null 설정 * infra: develop에 머지되었을 때만 발동하도록 수정 * feat: draw_rank column 이름 수정 * Infra: environment 삭제 * [Infra] CI CD test 3 (#45) * infra: 빌드 테스트 yml 작성 * infra: DB 정보 추가 * infra: ssh-agent 버전 변경 * infra: known_hosts 추가 * infra: db port 변경 * infra: database test 설정 변경 * infra: DB 환경변수 설정 및 application.yml 생성 * infra: application.yml 동적 생성 스크립트 수정 * infra: 레디스 설정 추가 * infra: redis test 추가 * infra: redis 버전 변경 * infra: redis cli 설치 * infra: application.yml 위치 및 내용 확인 * infra: Github Actions 환경변수에 REDIS_HOST, REDIS_PORT 추가 * infra: 환경변수 확인 추가 * infra: zip file 만들기 추가, AWS credentials 추가 * infra: 환경변수 이름 변경 - ARN -> AWS_ARN * infra: s3 bucket에 업로드 추가 * infra: code deploy 추가 * infra: code deploy 수정 * infra: code deploy 수정 * infra: appspec.yml 작성 * infra: application.yml 생성 경로 변경 * infra: application.yml 확인 스크립트 삭제 * infra: application.yml 생성 스크립트 수정 * infra: application-prod.yml 추가 * infra: appspec.yml 수정, 배포를 위한 sh파일 추가 * infra: deploy.yml 이름 변경 - test_deploy -> deploy * infra: body = null 설정 * infra: develop에 머지되었을 때만 발동하도록 수정 * feat: draw_rank column 이름 수정 * Infra: environment 삭제 * Infra: environment 삭제 * config: jwt 속성을 yml에 설정 * rebase: 원본 develop 브랜치와 병합 * doc: jacoco 파일 생성 * feat: EventLockException 처리 메서드 구현 * fix: url 변경 * refactor: 변수명 변경 * feat: 중복 응모에 대한 처리 구현 * fix: 변수 바인딩 수정 * feat: post 요청에 대한 처리 구현 * feat: swagger 파리미터 안보이도록 설정 * rebase: 원본 repo develop 브랜치와 rebase * feat: 정적 텍스트 상수 추가 * chore: jacoco 삭제 * fix: reverse 메서드 수행 코드 제거 * chore: import문 제거 * fix: repository 메서드 변경 * fix: repository 메서드 변경 --------- Co-authored-by: DrRivaski <48974215+DrRivaski@users.noreply.github.com> Co-authored-by: hyeokson --- .../fo_domain/comment/repository/CommentRepository.java | 2 +- .../backend/fo_domain/comment/service/CommentService.java | 2 +- .../backend/fo_domain/comment/util/ScrollPaginationUtil.java | 1 - .../softeer/backend/fo_domain/fcfs/service/FcfsService.java | 3 --- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/softeer/backend/fo_domain/comment/repository/CommentRepository.java b/src/main/java/com/softeer/backend/fo_domain/comment/repository/CommentRepository.java index 1c69741d..941c7334 100644 --- a/src/main/java/com/softeer/backend/fo_domain/comment/repository/CommentRepository.java +++ b/src/main/java/com/softeer/backend/fo_domain/comment/repository/CommentRepository.java @@ -12,5 +12,5 @@ @Repository public interface CommentRepository extends JpaRepository { - Page findAllByIdLessThanEqualOrderByIdDesc(Integer id, Pageable pageable); + Page findAllByIdLessThanOrderByIdDesc(Integer id, Pageable pageable); } diff --git a/src/main/java/com/softeer/backend/fo_domain/comment/service/CommentService.java b/src/main/java/com/softeer/backend/fo_domain/comment/service/CommentService.java index c7bd7eb5..d97674e5 100644 --- a/src/main/java/com/softeer/backend/fo_domain/comment/service/CommentService.java +++ b/src/main/java/com/softeer/backend/fo_domain/comment/service/CommentService.java @@ -32,7 +32,7 @@ public class CommentService { public CommentsResponseDto getComments(Integer userId, Integer cursor) { PageRequest pageRequest = PageRequest.of(0, SCROLL_SIZE + 1); - Page page = commentRepository.findAllByIdLessThanEqualOrderByIdDesc(cursor, pageRequest); + Page page = commentRepository.findAllByIdLessThanOrderByIdDesc(cursor, pageRequest); List comments = page.getContent(); diff --git a/src/main/java/com/softeer/backend/fo_domain/comment/util/ScrollPaginationUtil.java b/src/main/java/com/softeer/backend/fo_domain/comment/util/ScrollPaginationUtil.java index 01ca3845..9459d091 100644 --- a/src/main/java/com/softeer/backend/fo_domain/comment/util/ScrollPaginationUtil.java +++ b/src/main/java/com/softeer/backend/fo_domain/comment/util/ScrollPaginationUtil.java @@ -44,7 +44,6 @@ public List getCurrentScrollItems() { } else { itemsList = new ArrayList<>(itemsWithNextCursor.subList(0, countPerScroll)); } - Collections.reverse(itemsList); return itemsList; } diff --git a/src/main/java/com/softeer/backend/fo_domain/fcfs/service/FcfsService.java b/src/main/java/com/softeer/backend/fo_domain/fcfs/service/FcfsService.java index c11f228d..b8b8f610 100644 --- a/src/main/java/com/softeer/backend/fo_domain/fcfs/service/FcfsService.java +++ b/src/main/java/com/softeer/backend/fo_domain/fcfs/service/FcfsService.java @@ -23,14 +23,11 @@ import org.springframework.stereotype.Service; import java.time.LocalDate; -import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; import java.util.Map; -import static java.util.stream.Collectors.toList; - /** * 선착순 관련 이벤트를 처리하는 클래스 */