Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a0396eb
Author: JoJaeHyeon <[email protected]>
Date:   Tue Feb 27 15:42:34 2024 +0900

    Update README.md

commit eb755e4
Merge: b93b9fc 8134701
Author: JoJaeHyeon <[email protected]>
Date:   Tue Feb 27 15:38:38 2024 +0900

    Merge pull request #37 from uju-in/HandmadeCloud-patch-1

    docs : README 초안 업데이트

commit b93b9fc
Merge: e695369 6afc787
Author: 박이슬 <[email protected]>
Date:   Sun Feb 25 21:51:02 2024 +0900

    Merge pull request #59 from uju-in/NO-JIRA-redis-security-config

    [NO-JIRA] 레디스 보안 설정 추가

commit 6afc787
Author: Yiseul Park <[email protected]>
Date:   Sun Feb 25 15:18:37 2024 +0900

    feat: 레디스 비밀번호 설정 추가

commit e695369
Merge: 78ac56b 24ed277
Author: ByeongGon Kang <[email protected]>
Date:   Fri Feb 23 16:43:40 2024 +0900

    Merge pull request #58 from uju-in/LIME-107-BE-favorite-feat

    [LIME-107] transactional이 readonly로 인해 폴더가 생성되지 않는 버그 수정

commit 24ed277
Author: Curry4182 <[email protected]>
Date:   Fri Feb 23 16:05:16 2024 +0900

    fix: readonly로 인해 폴더가 생성되지 않는 버그 수정

commit 78ac56b
Merge: 20dce43 3a5f4ba
Author: ByeongGon Kang <[email protected]>
Date:   Fri Feb 23 15:55:53 2024 +0900

    Merge pull request #56 from uju-in/NO-JIRA-item-search-feat

    [NO-JIRA] 아이템 검색 기능 변경

commit 3a5f4ba
Author: Curry4182 <[email protected]>
Date:   Fri Feb 23 15:54:32 2024 +0900

    feat: 여러개의 request param을 하나의 클래스로 받을 수 있도록 수정, 스웨거에서 request param이 request body로 보이는 부분 수정

commit 20dce43
Merge: 864a476 50df8bf
Author: JoJaeHyeon <[email protected]>
Date:   Fri Feb 23 15:06:19 2024 +0900

    Merge pull request #50 from uju-in/LIME-103-seprate-domain-entity

    [LIME-103] Bucket bulk-insert 리팩토링

commit 864a476
Merge: 926cb43 e998326
Author: ByeongGon Kang <[email protected]>
Date:   Fri Feb 23 14:35:39 2024 +0900

    Merge pull request #57 from uju-in/LIME-107-BE-favorite-feat

    [LIME-107] LIME-107-BE-favorite-feat 브랜치 main 반영 PR

commit e998326
Merge: 514f439 4e0ffc6
Author: ByeongGon Kang <[email protected]>
Date:   Fri Feb 23 14:27:20 2024 +0900

    Merge pull request #53 from uju-in/LIME-108-BE-favorite-create-item-feat

    [LIME-108] 찜 아이템 이동 기능 추가

commit 4e0ffc6
Author: Curry4182 <[email protected]>
Date:   Thu Feb 22 21:25:38 2024 +0900

    feat: 폴더를 생성할 때 기본 폴더이름으로 생성하면 예외가 발생하도록 수정

commit c8ae9c2
Author: Curry4182 <[email protected]>
Date:   Thu Feb 22 21:10:17 2024 +0900

    feat: 기본 폴더가 중복된 경우 예외가 발생하도록 기능 변경

commit e5b92cb
Author: Curry4182 <[email protected]>
Date:   Thu Feb 22 17:36:36 2024 +0900

    feat: 아이템 검색할 때 keyword를 입력하지 않아도 조회할 수 있도록 기능 추가

commit 926cb43
Merge: 8e90c28 a1ba691
Author: 박이슬 <[email protected]>
Date:   Wed Feb 21 14:23:13 2024 +0900

    Merge pull request #55 from uju-in/NO-JIRA-fix-vote-ranking

    [NO-JIRA] 투표 랭킹 순위가 같을 경우, 투표 마감 시각이 빠른 순으로 정렬되도록 수정

commit 8e90c28
Merge: 7df2add 2deac09
Author: ByeongGon Kang <[email protected]>
Date:   Wed Feb 21 13:33:41 2024 +0900

    Merge pull request #54 from uju-in/LIME-111--review-bug-fix

    [LIME-111] 리뷰 관련 버그 수정

commit a1ba691
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 21 00:09:02 2024 +0900

    fix: 투표 랭킹 순위가 같을 경우 투표 마감 시각이 빠른 순으로 정렬되도록 수정

commit 7df2add
Merge: 9c7f9d9 a65dae2
Author: ByeongGon Kang <[email protected]>
Date:   Tue Feb 20 20:42:45 2024 +0900

    Merge pull request #51 from uju-in/NO-JIRA-api-module-dependencies-change

    [NO-JIRA] 의존성 위치 변경

commit 9c7f9d9
Merge: 6031d47 514f439
Author: ByeongGon Kang <[email protected]>
Date:   Tue Feb 20 20:42:03 2024 +0900

    Merge pull request #52 from uju-in/LIME-107-BE-favorite-feat

    [LIME-107] 찜 목록 조회 기능 추가

commit 2deac09
Author: Curry4182 <[email protected]>
Date:   Tue Feb 20 20:13:44 2024 +0900

    fix: null 리스트가 들어올 경우 NPE가 발생하는 버그 수정

commit 4327bf1
Author: Curry4182 <[email protected]>
Date:   Tue Feb 20 16:21:24 2024 +0900

    fix: transactional 없어서 삭제 안 되는 버그 수정

commit 6031d47
Merge: 31d6513 4155b93
Author: 박이슬 <[email protected]>
Date:   Mon Feb 19 23:23:18 2024 +0900

    Merge pull request #49 from uju-in/LIME-91-show-closed-and-ongoing-votes-together

    [LIME-91] 투표 목록 조회 요구사항 변경 - 투표 상태 조건, 정렬 조건 수정

commit 609df36
Author: Curry4182 <[email protected]>
Date:   Mon Feb 19 20:59:20 2024 +0900

    feat: 아이템을 담을 때 folder id가 없으면 default 폴더에 아이템 생성

commit 514f439
Author: Curry4182 <[email protected]>
Date:   Mon Feb 19 19:25:58 2024 +0900

    feat: favoritetype에 맞는 favorite 반환 기능 추가

commit a65dae2
Author: Curry4182 <[email protected]>
Date:   Mon Feb 19 16:49:39 2024 +0900

    build: 모듈의 성격에 맞게 의존성 위치 변경

commit 50df8bf
Author: JoJaeHyeon <[email protected]>
Date:   Wed Feb 14 23:47:33 2024 +0900

    refactor : 쿼리 수정

commit 1d90468
Author: JoJaeHyeon <[email protected]>
Date:   Wed Feb 14 23:40:23 2024 +0900

    chore : import문 수정

commit bd4dca9
Author: JoJaeHyeon <[email protected]>
Date:   Wed Feb 14 23:40:15 2024 +0900

    refactor : bucket batch insert를 위한 jdbcTemplate 적용

commit 4155b93
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 14 21:03:24 2024 +0900

    test: 깨진 투표 테스트 수정

commit def05d4
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 14 20:21:08 2024 +0900

    feat: 투표 정렬 조건 추가, 종료된 투표/진행 중인 투표 함께 보여주기

commit 31d6513
Merge: 619b2cd b7a3faa
Author: 박이슬 <[email protected]>
Date:   Wed Feb 14 15:28:02 2024 +0900

    Merge pull request #48 from uju-in/NO-JIRA-add-hobby-to-voteDetatil

    [NO-JIRA] 투표 상세 조회 결과에 취미 추가

commit b7a3faa
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 14 15:24:58 2024 +0900

    feat: 투표 상세 조회 결과에 취미 추가

commit 619b2cd
Merge: dc3bdef 3a8a9eb
Author: ByeongGon Kang <[email protected]>
Date:   Wed Feb 14 00:25:35 2024 +0900

    Merge pull request #47 from uju-in/LIME-100-BE-reveiw-api-path-refactor

    [LIME-100] 리뷰 api 경로 수정

commit dc3bdef
Merge: 1b80e9d 4f8a211
Author: ByeongGon Kang <[email protected]>
Date:   Wed Feb 14 00:25:25 2024 +0900

    Merge pull request #46 from uju-in/LIME-97--favorite-item-refactor

    [LIME-97] favorite item 리팩토링

commit 3a8a9eb
Author: Curry4182 <[email protected]>
Date:   Wed Feb 14 00:12:35 2024 +0900

    refactor: 리뷰 목록 조회 itemId 관련 수정

commit c65c1c4
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 21:14:48 2024 +0900

    refactor: 리뷰 api 경로 수정

commit 4f8a211
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 16:12:58 2024 +0900

    refactor: 컨트롤러에서 사용되는 메서드와 변수명 favoriteItem, folder로 변경

commit 1b80e9d
Merge: 68770ca f136918
Author: ByeongGon Kang <[email protected]>
Date:   Tue Feb 13 15:35:02 2024 +0900

    Merge pull request #45 from uju-in/LIME-96--favorite-get-list-feat

    [LIME-96] 폴더에 포함되어 있는 아이템 개수 반환 기능 추가

commit 2053ef7
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 15:33:21 2024 +0900

    refactor: api 경로에 단수 명사를 복수로 변경

commit 68770ca
Merge: 763dfb0 9dc56d4
Author: 박이슬 <[email protected]>
Date:   Tue Feb 13 15:11:24 2024 +0900

    Merge pull request #42 from uju-in/LIME-87-apply-changed-vote-requirements

    [LIME-87] 투표 변경된 요구사항 적용 1 - 투표 상세, 투표 랭킹 관련

commit 9dc56d4
Author: Yiseul Park <[email protected]>
Date:   Tue Feb 13 14:51:27 2024 +0900

    rename: VoteRedis -> VoteRankingInfo 클래스명 변경

commit 7e16153
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 14:37:11 2024 +0900

    refactor: api 경로 수정

commit 2b85005
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 03:11:08 2024 +0900

    remove: 사용하지 않는 favorite 관련 클래스 삭제

commit a847b3c
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 02:50:14 2024 +0900

    refactor: 도메인 이름을 favoriteItem에서 favorite으로 변경

commit 9aec33b
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 02:21:46 2024 +0900

    refactor: API 변수명을 favoriteItem, folder를 구분해서 변경

commit 3e42007
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 01:53:07 2024 +0900

    refactor: favorite item 도메인과 item 도메인 기능 분리

commit f136918
Author: Curry4182 <[email protected]>
Date:   Tue Feb 13 00:58:30 2024 +0900

    feat: 폴더에 포함되어 있는 아이템 개수 반환 기능 추가

commit 763dfb0
Merge: 03567f3 efb9281
Author: ByeongGon Kang <[email protected]>
Date:   Sun Feb 11 03:33:08 2024 +0900

    Merge pull request #44 from uju-in/LIME-95-BE-favorite-move-feat

    [LIME-95] 찜 폴더 이동 기능 추가

commit 03567f3
Merge: e2ae6b6 addf7a4
Author: ByeongGon Kang <[email protected]>
Date:   Sun Feb 11 03:32:43 2024 +0900

    Merge pull request #43 from uju-in/LIME-94--loki-log-back

    [LIME-94] Loki 서버 전송을 위한 로그백 설정

commit 318dbb9
Author: Yiseul Park <[email protected]>
Date:   Sat Feb 10 15:29:19 2024 +0900

    feat: 투표 랭킹을 취미별로 조회

commit efb9281
Author: Curry4182 <[email protected]>
Date:   Thu Feb 8 19:09:20 2024 +0900

    feat: 찜 폴더 이동 기능 추가

commit addf7a4
Author: Curry4182 <[email protected]>
Date:   Thu Feb 8 18:12:44 2024 +0900

    feat: 기존 코드에 있던 의존성 추가

commit e2ae6b6
Merge: 5008e6b f7c22c0
Author: JoJaeHyeon <[email protected]>
Date:   Thu Feb 8 17:32:48 2024 +0900

    Merge pull request #31 from uju-in/NO-JIRA-SSE-refactoring

    [NO-JIRA] SSE 리팩토링

commit f7c22c0
Merge: de8d13a 5008e6b
Author: JoJaeHyeon <[email protected]>
Date:   Thu Feb 8 17:32:40 2024 +0900

    Merge branch 'main' into NO-JIRA-SSE-refactoring

commit de8d13a
Author: JoJaeHyeon <[email protected]>
Date:   Thu Feb 8 17:31:26 2024 +0900

    refactor : 요청 시간 수정

commit 7407fc1
Author: Curry4182 <[email protected]>
Date:   Thu Feb 8 17:12:49 2024 +0900

    feat: 로키서버에 로그 전송 기능 추가

commit 5008e6b
Merge: 637b08c 707c87c
Author: ByeongGon Kang <[email protected]>
Date:   Thu Feb 8 14:37:05 2024 +0900

    Merge pull request #41 from uju-in/LIME-93--review-remove-bug-fix

    [LIME-93]리뷰 이미지와 리뷰 좋아요가 있는 경우 삭제 안되는 버그 수정

commit 8c97b98
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 21:31:10 2024 +0900

    test: 변경된 코드에 맞게 테스트 수정

commit 98e9bad
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 20:55:24 2024 +0900

    remove: 사용하지 않는 메서드 삭제

commit 056caf7
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 20:39:21 2024 +0900

    bug: 투표 재참여 시 투표 랭킹 인기순 올라가는 버그 수정

commit 40ba884
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 19:51:34 2024 +0900

    feat: 투표 종료와 삭제 시 랭킹에서 제거, 투표 참여 취소 시 랭킹에서 인기순 1 감소

commit c4490e0
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 19:17:15 2024 +0900

    feat: 투표 랭킹이 없는 경우 예외 처리

commit 707c87c
Merge: 5468014 637b08c
Author: ByeongGon Kang <[email protected]>
Date:   Wed Feb 7 19:06:58 2024 +0900

    Merge branch 'main' into LIME-93--review-remove-bug-fix

commit 637b08c
Merge: 8b51cc5 52571b1
Author: ByeongGon Kang <[email protected]>
Date:   Wed Feb 7 19:02:48 2024 +0900

    Merge pull request #38 from uju-in/LIME-85-BE-review-update-image-feat

    [LIME-85] 리뷰 이미지 수정 기능 추가

commit 52571b1
Author: Curry4182 <[email protected]>
Date:   Wed Feb 7 19:00:53 2024 +0900

    refactor: 내부적으로 변경되지 않는 인자에 final 키워드 추가

commit c0bc5f3
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 18:57:46 2024 +0900

    feat: 투표 랭킹 요구사항 변경

    1. 랭킹 10위 -> 6위까지만 보여주기
    2. 투표 id, 현재 참여자 수, 아이템 1~2번 이미지만 반환하기

commit 3e4d88b
Author: Curry4182 <[email protected]>
Date:   Wed Feb 7 18:53:44 2024 +0900

    refactor: 메서드 이름에 맞게 기능 변경

commit b287efb
Author: Curry4182 <[email protected]>
Date:   Wed Feb 7 18:27:35 2024 +0900

    remove: 사용되지 않는 log기능 삭제

commit 5468014
Author: Curry4182 <[email protected]>
Date:   Wed Feb 7 18:16:20 2024 +0900

    fix: 리뷰 이미지와 리뷰 좋아요가 있는 경우 삭제 안되는 버그 수정

commit 4a90bbf
Author: Yiseul Park <[email protected]>
Date:   Wed Feb 7 16:46:18 2024 +0900

    feat: 투표 상세 조회에 투표 최대 참여 인원 수, 마감 시각 추가하기

commit 8b51cc5
Merge: 2aa5ad4 200408e
Author: JoJaeHyeon <[email protected]>
Date:   Tue Feb 6 14:56:59 2024 +0900

    Merge pull request #40 from uju-in/no-jira-grafana-install

    [NO-JIRA] 그라파나 설정 추가

commit 200408e
Author: JoJaeHyeon <[email protected]>
Date:   Tue Feb 6 14:55:25 2024 +0900

    feat : grafana 모니터링 툴 적용

commit 2aa5ad4
Merge: 49b16ad 816e545
Author: ByeongGon Kang <[email protected]>
Date:   Tue Feb 6 14:02:44 2024 +0900

    Merge pull request #39 from uju-in/LIME-86-BE-review-like-bug-fix

    [LIME-86] 리뷰 좋아요를 저장할 때 멤버 아이디가 저장 되도록 버그 수정

commit 816e545
Author: Curry4182 <[email protected]>
Date:   Tue Feb 6 04:46:25 2024 +0900

    fix: 리뷰 좋아요를 저장할 때 멤버 아이디가 저장 되도록 버그 수정

commit 6ec34ee
Author: Curry4182 <[email protected]>
Date:   Tue Feb 6 04:06:31 2024 +0900

    feat: 기존 리뷰 이미지 삭제 기능 추가, 기존 리뷰에 리뷰 이미지 생성 기능 추가

commit 42ec12a
Author: Curry4182 <[email protected]>
Date:   Tue Feb 6 04:04:07 2024 +0900

    feat: 버킷의 url 주소로 버킷의 오브젝트를 삭제할 수 있도록 기능 추가

commit d8d48ff
Author: Curry4182 <[email protected]>
Date:   Tue Feb 6 04:02:09 2024 +0900

    fix: 리뷰 생성하는 경우 reviewId로 저장되도록 수정

commit 49b16ad
Merge: 9eeafac 0a057b6
Author: 박이슬 <[email protected]>
Date:   Sun Feb 4 21:40:53 2024 +0900

    Merge pull request #33 from uju-in/LIME-76-change-vote-creation-requirements

commit 0a057b6
Merge: 12255a2 9eeafac
Author: 박이슬 <[email protected]>
Date:   Sun Feb 4 17:13:48 2024 +0900

    Merge branch 'main' into LIME-76-change-vote-creation-requirements

commit 9eeafac
Merge: 3ec577c 12d3687
Author: ByeongGon Kang <[email protected]>
Date:   Fri Feb 2 15:57:48 2024 +0900

    Merge pull request #36 from uju-in/LIME-79-BE-item-review-isLike-feat

    [NO-JIRA] 로그인한 사용자 정보를 담는 모델 클래스 추가

commit 12d3687
Author: Curry4182 <[email protected]>
Date:   Fri Feb 2 15:00:15 2024 +0900

    feat: 로그인한 사용자 정보를 담는 모델 클래스 추가

commit 12255a2
Author: Yiseul Park <[email protected]>
Date:   Wed Jan 31 16:03:18 2024 +0900

    feat: 투표 아이템 검증 추가

commit 8f06e68
Author: Yiseul Park <[email protected]>
Date:   Wed Jan 31 14:39:33 2024 +0900

    feat: 투표 인원 수 최대 1000명 제한

commit 19c830b
Merge: 6a87517 5374dfb
Author: JoJaeHyeon <[email protected]>
Date:   Tue Jan 30 00:12:58 2024 +0900

    Merge branch 'main' into NO-JIRA-SSE-refactoring

commit 6a87517
Author: JoJaeHyeon <[email protected]>
Date:   Tue Jan 30 00:11:01 2024 +0900

    chore : 네이밍 정리 및 map을 인스턴스 변수로 이동, 클래스 네임 변경

commit f105e76
Author: JoJaeHyeon <[email protected]>
Date:   Mon Jan 29 23:09:28 2024 +0900

    refactor : 서비스 레이어에 옵저버 디자인 패턴 적용

commit 6a5287b
Author: JoJaeHyeon <[email protected]>
Date:   Mon Jan 29 23:06:31 2024 +0900

    refactor : transactionalEventListener 적용 및 비동기 처리

commit 344389c
Author: JoJaeHyeon <[email protected]>
Date:   Mon Jan 29 23:06:15 2024 +0900

    refactor : sseEmitter 객체 반환

commit 9ff4cd0
Author: JoJaeHyeon <[email protected]>
Date:   Mon Jan 29 23:06:03 2024 +0900

    refactor : 알림 기능에 옵저버 디자인 패턴 적용

commit 3be97f0
Author: JoJaeHyeon <[email protected]>
Date:   Mon Jan 29 15:24:28 2024 +0900

    chore : sse-observer pattern 개발중

commit a640aa7
Author: JoJaeHyeon <[email protected]>
Date:   Sat Jan 27 00:24:07 2024 +0900

    refactor : 알림 서비스 비동기 처리

commit 6442597
Author: JoJaeHyeon <[email protected]>
Date:   Sat Jan 27 00:23:38 2024 +0900

    chore : 로직 중요도에 따라 코드 순서 변경

commit 6e1b61d
Author: Yiseul Park <[email protected]>
Date:   Fri Jan 26 17:53:00 2024 +0900

    refactor: 포인트 지급 AOP -> 이벤트 처리로 변경

commit 4d8a5d4
Author: Yiseul Park <[email protected]>
Date:   Fri Jan 26 17:08:57 2024 +0900

    chore: 트랜잭션 의존성 추가

commit 161e9d7
Author: Curry4182 <[email protected]>
Date:   Fri Jan 26 06:09:21 2024 +0900

    fix: sse에 heartbeat 추가, 다중 접속할 수 있도록 자료구조 변경
  • Loading branch information
HandmadeCloud committed Feb 28, 2024
1 parent 7d56943 commit 87e58d8
Show file tree
Hide file tree
Showing 106 changed files with 1,391 additions and 760 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


## 1. 🍋 프로젝트 소개
서비스 링크 : /https://uju-lime.vercel.app/ <br>

Expand Down Expand Up @@ -47,14 +45,13 @@
## 4. 📝 문서화 링크 (테크 스팩, 트러블 슈팅, 개인 내용 정리)



## 5. ⚒️ 기술 스택

### 백엔드
<img src="https://github.com/bucket-back/bucket-back-backend/assets/98391539/6535b1c4-46af-4d00-b7ab-3e2fc9fda57c" width="80%" height="80%">

<img width="1017" alt="스크린샷 2024-02-27 오후 3 35 02" src="https://github.com/uju-in/lime-backend/assets/77893164/e93893d0-d034-4182-9a1c-b32754eb99b6">

## 6. 💫 CICD 파이프라인
## 6. 💫 CICD 파이프라인, 모니터링
<img width="2135" alt="스크린샷 2024-02-27 오후 3 34 34" src="https://github.com/uju-in/lime-backend/assets/77893164/aa7cee2a-d85f-41d3-8e00-d8294ad9b3df">
<img width="985" alt="스크린샷 2024-02-27 오후 3 35 14" src="https://github.com/uju-in/lime-backend/assets/77893164/4b85d934-af44-4bb4-a592-094dac429372">
6 changes: 2 additions & 4 deletions lime-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework:spring-tx'


implementation project(':lime-domain')
implementation project(':lime-common')
implementation project(':lime-infrastructure')
Expand All @@ -37,13 +36,12 @@ dependencies {
testImplementation(testFixtures(project(':lime-domain')))
testImplementation 'org.springframework.boot:spring-boot-starter-test'

// Cache
// cache
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation "com.github.ben-manes.caffeine:caffeine:3.1.8"

//oauth2
// oauth2
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
@ConfigurationPropertiesScan("com.programmers.lime.global.config.security.jwt")
public class LimeApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void createComment(
final Member commentWriter = memberUtils.getCurrentMember();
final Comment comment = commentAppender.append(feedId, content, commentWriter.getId());

SsePayload ssePayload = CommentCreateEvent.toSsePayload(commentWriter.getNickname(), comment);
applicationEventPublisher.publishEvent(new PointEvent(commentWriter.getId(), 5));

SsePayload ssePayload = CommentCreateEvent.toSsePayload(commentWriter.getNickname(), comment);
applicationEventPublisher.publishEvent(ssePayload);
applicationEventPublisher.publishEvent(new PointEvent(commentWriter.getId(), 5));
}

public void modifyComment(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
package com.programmers.lime.domains.favorite.api;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.programmers.lime.common.model.FavoriteType;
import com.programmers.lime.domains.favorite.api.dto.request.FavoriteRemoveRequest;
import com.programmers.lime.domains.favorite.api.dto.request.FavoriteItemCreateRequest;
import com.programmers.lime.domains.favorite.api.dto.request.FolderCreateRequest;
import com.programmers.lime.domains.favorite.api.dto.request.FolderUpdateRequest;
import com.programmers.lime.domains.favorite.api.dto.request.MemberItemMoveRequest;
import com.programmers.lime.domains.favorite.api.dto.response.FavoriteItemCreateResponse;
import com.programmers.lime.domains.favorite.api.dto.response.FavoritesGetResponse;
import com.programmers.lime.domains.favorite.application.FavoriteItemService;
import com.programmers.lime.domains.favorite.application.FolderService;
import com.programmers.lime.domains.favorite.application.dto.FavoriteItemCreateServiceResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;

@Tag(name = "favorites", description = "찜 API")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/favorites")
public class FavoriteItemController {

private final FavoriteItemService favoriteItemService;

private final FolderService folderService;

@Operation(summary = "찜 ", description = "MemberItemAddRequest을 이용하여 사용자의 찜 목록에 아이템 담기 합니다.")
@PostMapping("/items")
public ResponseEntity<FavoriteItemCreateResponse> createFavoriteItems(
@Valid @RequestBody final FavoriteItemCreateRequest request
) {
FavoriteItemCreateServiceResponse serviceResponse = favoriteItemService.createFavoriteItems(
request.toFavoriteItemIdRegistry()
);
FavoriteItemCreateResponse response = FavoriteItemCreateResponse.from(serviceResponse);

return ResponseEntity.ok(response);
}

@Operation(summary = "찜 목록 조회", description = "찜 목록을 조회 합니다.")
@GetMapping()
public ResponseEntity<FavoritesGetResponse> getFavorites(
@RequestParam(required = false) final Long folderId,
@RequestParam(required = false) final String favoriteTypeCondition
) {
FavoritesGetResponse response = favoriteItemService.getFavorites(
folderId,
FavoriteType.from(favoriteTypeCondition)
);

return ResponseEntity.ok(response);
}

@Operation(summary = "찜 아이템 이동", description = "찜 아이템을 다른 폴더로 이동 합니다.")
@PutMapping("/items/move")
public ResponseEntity<Void> moveFavoriteItems(
@RequestBody @Valid final MemberItemMoveRequest request
) {
favoriteItemService.moveFavoriteItems(
request.folderId(),
request.favoriteItemIds()
);

return ResponseEntity.ok().build();
}

@Operation(summary = "찜 항목 제거", description = "찜 목록으로 부터 아이템이나 폴더를 제거 합니다.")
@DeleteMapping()
public ResponseEntity<Void> removeFavorite(
@ModelAttribute @Valid final FavoriteRemoveRequest request
) {
favoriteItemService.removeFavoriteItems(request.favoriteItemIds());
folderService.removeFolders(request.folderIds());

return ResponseEntity.ok().build();
}

@Operation(summary = "찜 목록 폴더 생성", description = "찜 목록 폴더를 생성 합니다.")
@PostMapping("/folders")
public ResponseEntity<Void> addMemberItemFolder(
@RequestBody @Valid final FolderCreateRequest request
) {
folderService.createMemberItemFolder(
request.folderName()
);

return ResponseEntity.ok().build();
}

@Operation(summary = "찜 목록 폴더 이름 수정", description = "찜 목록 폴더 이름을 수정 합니다.")
@PutMapping("/folders/{folderId}")
public ResponseEntity<Void> modifyFolder(
@PathVariable final Long folderId,
@RequestBody @Valid final FolderUpdateRequest request
) {
folderService.modifyFolder(
folderId,
request.folderName()
);

return ResponseEntity.ok().build();
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.programmers.lime.domains.item.api.dto.request;
package com.programmers.lime.domains.favorite.api.dto.request;

import java.util.List;

import com.programmers.lime.domains.item.model.MemberItemIdRegistry;
import com.programmers.lime.domains.item.model.FavoriteItemIdRegistry;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

public record MemberItemCreateRequest(
public record FavoriteItemCreateRequest(

@Schema(description = "여러 아이템 id", example = "[1, 2, 3]")
@NotNull(message = "아이템 목록은 필수 값 입니다.")
Expand All @@ -16,7 +16,7 @@ public record MemberItemCreateRequest(
@Schema(description = "아이템 폴더 id", example = "1")
Long folderId
) {
public MemberItemIdRegistry toMemberItemIdRegistry() {
return new MemberItemIdRegistry(itemIds, folderId);
public FavoriteItemIdRegistry toFavoriteItemIdRegistry() {
return new FavoriteItemIdRegistry(itemIds, folderId);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.programmers.lime.domains.favorite.api.dto.request;

import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;

public record FavoriteRemoveRequest(
@Schema(description = "여러 찜한 아이템 id", example = "1, 2, 3")
List<Long> favoriteItemIds,

@Schema(description = "여러 폴더 id", example = "1, 2, 3")
List<Long> folderIds
) {
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.programmers.lime.domains.item.api.dto.request;
package com.programmers.lime.domains.favorite.api.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public record MemberItemFolderCreateRequest(
public record FolderCreateRequest(
@Schema(description = "폴더 이름", example = "농구 취미 폴더")
@NotNull(message = "폴더 이름을 입력하지 않았습니다.")
@Size(min = 1, max = 20, message = "폴더 이름은 1자 이상 20자 이하로 입력해주세요.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.programmers.lime.domains.item.api.dto.request;
package com.programmers.lime.domains.favorite.api.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public record MemberItemFolderUpdateRequest(
public record FolderUpdateRequest(

@Schema(description = "폴더 이름", example = "농구 취미 폴더")
@NotNull(message = "폴더 이름을 입력하지 않았습니다.")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.programmers.lime.domains.favorite.api.dto.request;

import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

public record MemberItemMoveRequest(

@Schema(description = "이동할 폴더 id", example = "1")
Long folderId,

@Schema(description = "이동할 찜 아이템 목록", example = "[1, 2, 3]")
@NotNull(message = "찜 아이템 목록은 필수 값 입니다.")
List<Long> favoriteItemIds
) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.programmers.lime.domains.favorite.api.dto.response;

import java.util.List;

import com.programmers.lime.domains.favorite.application.dto.FavoriteItemCreateServiceResponse;

public record FavoriteItemCreateResponse(List<Long> itemIds) {
public static FavoriteItemCreateResponse from(final FavoriteItemCreateServiceResponse response) {
return new FavoriteItemCreateResponse(
response.itemIds()
);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.programmers.lime.domains.item.api.dto.response;
package com.programmers.lime.domains.favorite.api.dto.response;

import java.util.List;

import com.programmers.lime.domains.item.model.MemberItemFavoriteInfo;

public record MemberItemFavoritesGetResponse(
public record FavoritesGetResponse(
int totalCount,
List<MemberItemFavoriteInfo> favoriteInfos
){
Expand Down
Loading

0 comments on commit 87e58d8

Please sign in to comment.