From 6bb10fdce6ea3043b1258776c7f37d99f7cf85e2 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Tue, 13 Feb 2024 00:55:31 +0900 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0=20(#210)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/teumteum/meeting/service/MeetingService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/net/teumteum/meeting/service/MeetingService.java b/src/main/java/net/teumteum/meeting/service/MeetingService.java index 2657f43..99cfc41 100644 --- a/src/main/java/net/teumteum/meeting/service/MeetingService.java +++ b/src/main/java/net/teumteum/meeting/service/MeetingService.java @@ -112,7 +112,6 @@ public PageDto getMeetingsBySpecification(Pageable pageable, T } else if (Boolean.TRUE.equals(isBookmarked)) { spec = MeetingSpecification.withBookmarkedUserId(userId); } - var meetings = meetingRepository.findAll(spec, pageable); return PageDto.of(MeetingsResponse.of(meetings.getContent()), meetings.hasNext()); From 9eac8c543cc919e3ec3dca4e8726d75d97607440 Mon Sep 17 00:00:00 2001 From: ChoiDongKuen Date: Tue, 13 Feb 2024 02:16:48 +0900 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20=EC=86=8C=EC=85=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EC=97=90=EB=9F=AC=20=EA=B8=B4=EA=B8=89=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#214)=20(#215)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/teumteum/alert/app/AlertHandler.java | 4 ++-- .../core/security/filter/JwtAuthenticationFilter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/teumteum/alert/app/AlertHandler.java b/src/main/java/net/teumteum/alert/app/AlertHandler.java index 86e6bc6..56b6400 100644 --- a/src/main/java/net/teumteum/alert/app/AlertHandler.java +++ b/src/main/java/net/teumteum/alert/app/AlertHandler.java @@ -45,7 +45,7 @@ public void handleBeforeMeetingAlerts(BeforeMeetingAlerted alerted) { @Async(ALERT_EXECUTOR) @EventListener(EndMeetingAlerted.class) - public void handleEndMeetingAlerts(EndMeetingAlerted alerted) { + public void handleStartMeetingAlerts(EndMeetingAlerted alerted) { userAlertService.findAllByUserId(alerted.userIds()) .stream() .map(userAlert -> Pair.of(userAlert.getToken(), @@ -64,7 +64,7 @@ private String toCommaString(List ids) { for (int i = 0; i < ids.size() - 1; i++) { stringBuilder.append(ids.get(i)).append(","); } - stringBuilder.append(ids.get(ids.size() - 1)); + stringBuilder.append(ids.getLast()); return stringBuilder.toString(); } diff --git a/src/main/java/net/teumteum/core/security/filter/JwtAuthenticationFilter.java b/src/main/java/net/teumteum/core/security/filter/JwtAuthenticationFilter.java index 20ef8e3..36e960d 100644 --- a/src/main/java/net/teumteum/core/security/filter/JwtAuthenticationFilter.java +++ b/src/main/java/net/teumteum/core/security/filter/JwtAuthenticationFilter.java @@ -72,7 +72,7 @@ private void saveUserAuthentication(User user) { private String resolveTokenFromRequest(HttpServletRequest request) { String token = request.getHeader(jwtProperty.getAccess().getHeader()); - if (token.toLowerCase().startsWith(jwtProperty.getBearer().toLowerCase())) { + if (StringUtils.hasText(token) && token.toLowerCase().startsWith(jwtProperty.getBearer().toLowerCase())) { return token.substring(7); } return null; From 1a7052c14d5cec13ed0fd0ccba918f15e707f84b Mon Sep 17 00:00:00 2001 From: ChoiDongKuen Date: Wed, 14 Feb 2024 04:22:36 +0900 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=EA=B8=B0=EC=A1=B4=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=20=EB=A6=AC=EB=B7=B0=20=EC=A1=B0=ED=9A=8C=20API=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EB=B3=80=EA=B2=BD=20(#218)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: userId 에 해당하는 유저 리뷰 조회 API 로직 변경 (#217) * test: 통합테스트 수정 (#217) * test: 단위테스트 수정 (#217) --- .../user/controller/UserController.java | 6 +++--- .../teumteum/user/domain/UserRepository.java | 9 ++++---- .../domain/response/UserReviewResponse.java | 10 +++++++++ .../domain/response/UserReviewsResponse.java | 8 ++++--- .../teumteum/user/service/UserService.java | 6 ++++-- .../java/net/teumteum/integration/Api.java | 4 ++-- .../integration/UserIntegrationTest.java | 4 +++- .../user/controller/UserControllerTest.java | 19 ++++++++--------- .../unit/user/service/UserServiceTest.java | 21 ++++++++++--------- .../user/domain/UserRepositoryTest.java | 7 ++++--- 10 files changed, 56 insertions(+), 38 deletions(-) create mode 100644 src/main/java/net/teumteum/user/domain/response/UserReviewResponse.java diff --git a/src/main/java/net/teumteum/user/controller/UserController.java b/src/main/java/net/teumteum/user/controller/UserController.java index 6523683..feb37d9 100644 --- a/src/main/java/net/teumteum/user/controller/UserController.java +++ b/src/main/java/net/teumteum/user/controller/UserController.java @@ -116,10 +116,10 @@ public void registerReview( userService.registerReview(meetingId, getCurrentUserId(), request); } - @GetMapping("/reviews") + @GetMapping("/{userId}/reviews") @ResponseStatus(HttpStatus.OK) - public List getUserReviews() { - return userService.getUserReviews(getCurrentUserId()); + public UserReviewsResponse getUserReviews(@PathVariable("userId") Long userId) { + return userService.getUserReviews(userId); } @ResponseStatus(HttpStatus.BAD_REQUEST) diff --git a/src/main/java/net/teumteum/user/domain/UserRepository.java b/src/main/java/net/teumteum/user/domain/UserRepository.java index d0380f2..b611a17 100644 --- a/src/main/java/net/teumteum/user/domain/UserRepository.java +++ b/src/main/java/net/teumteum/user/domain/UserRepository.java @@ -3,7 +3,7 @@ import java.util.List; import java.util.Optional; import net.teumteum.core.security.Authenticated; -import net.teumteum.user.domain.response.UserReviewsResponse; +import net.teumteum.user.domain.response.UserReviewResponse; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -15,7 +15,8 @@ public interface UserRepository extends JpaRepository { Optional findByAuthenticatedAndOAuthId(@Param("authenticated") Authenticated authenticated, @Param("oAuthId") String oAuthId); - @Query("select new net.teumteum.user.domain.response.UserReviewsResponse(r,count(r)) " - + "from users u join u.reviews r where u.id = :userId group by r") - List countUserReviewsByUserId(@Param("userId") Long userId); + @Query("select new net.teumteum.user.domain.response.UserReviewResponse(r, count(r)) " + + "from users u join u.reviews r where u = :user group by r") + List countUserReviewsByUser(@Param("user") User user); + } diff --git a/src/main/java/net/teumteum/user/domain/response/UserReviewResponse.java b/src/main/java/net/teumteum/user/domain/response/UserReviewResponse.java new file mode 100644 index 0000000..8ec04a8 --- /dev/null +++ b/src/main/java/net/teumteum/user/domain/response/UserReviewResponse.java @@ -0,0 +1,10 @@ +package net.teumteum.user.domain.response; + +import net.teumteum.user.domain.Review; + +public record UserReviewResponse( + Review review, + long count +) { + +} diff --git a/src/main/java/net/teumteum/user/domain/response/UserReviewsResponse.java b/src/main/java/net/teumteum/user/domain/response/UserReviewsResponse.java index 7454f52..bf53ed6 100644 --- a/src/main/java/net/teumteum/user/domain/response/UserReviewsResponse.java +++ b/src/main/java/net/teumteum/user/domain/response/UserReviewsResponse.java @@ -1,10 +1,12 @@ package net.teumteum.user.domain.response; -import net.teumteum.user.domain.Review; +import java.util.List; public record UserReviewsResponse( - Review review, - long count + List reviews ) { + public static UserReviewsResponse of(List reviews) { + return new UserReviewsResponse(reviews); + } } diff --git a/src/main/java/net/teumteum/user/service/UserService.java b/src/main/java/net/teumteum/user/service/UserService.java index 8429d05..723d628 100644 --- a/src/main/java/net/teumteum/user/service/UserService.java +++ b/src/main/java/net/teumteum/user/service/UserService.java @@ -116,8 +116,10 @@ public void registerReview(Long meetingId, Long currentUserId, ReviewRegisterReq }); } - public List getUserReviews(Long userId) { - return userRepository.countUserReviewsByUserId(userId); + public UserReviewsResponse getUserReviews(Long userId) { + var user = getUser(userId); + + return UserReviewsResponse.of(userRepository.countUserReviewsByUser(user)); } public FriendsResponse findFriendsByUserId(Long userId) { diff --git a/src/test/java/net/teumteum/integration/Api.java b/src/test/java/net/teumteum/integration/Api.java index a65e350..0002b52 100644 --- a/src/test/java/net/teumteum/integration/Api.java +++ b/src/test/java/net/teumteum/integration/Api.java @@ -196,10 +196,10 @@ ResponseSpec deleteMeeting(String accessToken, Long meetingId) { .exchange(); } - ResponseSpec getUserReviews(String accessToken) { + ResponseSpec getUserReviews(Long userId, String accessToken) { return webTestClient .get() - .uri("/users/reviews") + .uri("/users/" + userId + "/reviews") .header(HttpHeaders.AUTHORIZATION, accessToken) .exchange(); } diff --git a/src/test/java/net/teumteum/integration/UserIntegrationTest.java b/src/test/java/net/teumteum/integration/UserIntegrationTest.java index 916bb80..bb42461 100644 --- a/src/test/java/net/teumteum/integration/UserIntegrationTest.java +++ b/src/test/java/net/teumteum/integration/UserIntegrationTest.java @@ -346,10 +346,12 @@ void Get_user_reviews() { // given var existUser = repository.saveAndGetUser(); + var userId = existUser.getId(); + securityContextSetting.set(existUser.getId()); // when - var expected = api.getUserReviews(VALID_TOKEN); + var expected = api.getUserReviews(userId, VALID_TOKEN); // then Assertions.assertThat(expected.expectStatus().isOk() diff --git a/src/test/java/net/teumteum/unit/user/controller/UserControllerTest.java b/src/test/java/net/teumteum/unit/user/controller/UserControllerTest.java index f425e05..77afd49 100644 --- a/src/test/java/net/teumteum/unit/user/controller/UserControllerTest.java +++ b/src/test/java/net/teumteum/unit/user/controller/UserControllerTest.java @@ -37,6 +37,7 @@ import net.teumteum.user.domain.request.UserRegisterRequest; import net.teumteum.user.domain.request.UserWithdrawRequest; import net.teumteum.user.domain.response.UserRegisterResponse; +import net.teumteum.user.domain.response.UserReviewResponse; import net.teumteum.user.domain.response.UserReviewsResponse; import net.teumteum.user.service.UserService; import org.junit.jupiter.api.BeforeEach; @@ -238,27 +239,25 @@ void Register_reviews_with_400_bad_request() throws Exception { class Get_user_reviews_api_unit { @Test - @DisplayName("로그인한 회원 id 에 해당하는 회원 리뷰와 200 OK을 반환한다.") + @DisplayName("user id 에 해당하는 회원 리뷰와 200 OK을 반환한다.") void Get_user_reviews_with_200_ok() throws Exception { // given var userId = 1L; - given(securityService.getCurrentUserId()).willReturn(userId); - given(userService.getUserReviews(anyLong())) - .willReturn(List.of(new UserReviewsResponse(별로에요, 2L), - new UserReviewsResponse(최고에요, 3L))); + .willReturn(UserReviewsResponse.of(List.of(new UserReviewResponse(별로에요, 2L), + new UserReviewResponse(최고에요, 3L)))); // when & then - mockMvc.perform(get("/users/reviews") + mockMvc.perform(get("/users/{userId}/reviews", 1) .with(csrf()) .header(AUTHORIZATION, VALID_ACCESS_TOKEN)) .andDo(print()) .andExpect(status().isOk()) - .andExpect(jsonPath("$", notNullValue())) - .andExpect(jsonPath("$", hasSize(2))) - .andExpect(jsonPath("$[0].count", is(2))) - .andExpect(jsonPath("$[0].review").value("별로에요")); + .andExpect(jsonPath("$.reviews", notNullValue())) + .andExpect(jsonPath("$.reviews", hasSize(2))) + .andExpect(jsonPath("$.reviews[0].count", is(2))) + .andExpect(jsonPath("$.reviews[0].review").value("별로에요")); } } diff --git a/src/test/java/net/teumteum/unit/user/service/UserServiceTest.java b/src/test/java/net/teumteum/unit/user/service/UserServiceTest.java index f682353..66b1668 100644 --- a/src/test/java/net/teumteum/unit/user/service/UserServiceTest.java +++ b/src/test/java/net/teumteum/unit/user/service/UserServiceTest.java @@ -30,7 +30,7 @@ import net.teumteum.user.domain.request.UserRegisterRequest; import net.teumteum.user.domain.request.UserWithdrawRequest; import net.teumteum.user.domain.response.UserRegisterResponse; -import net.teumteum.user.domain.response.UserReviewsResponse; +import net.teumteum.user.domain.response.UserReviewResponse; import net.teumteum.user.service.UserService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -251,23 +251,24 @@ class Get_user_reviews_api_unit { void Return_user_reviews_with_200_ok() { // given var userId = 1L; + var existUser = UserFixture.getIdUser(); - var response = List.of(new UserReviewsResponse(최고에요, 2L) - , new UserReviewsResponse(별로에요, 3L)); + var response = List.of(new UserReviewResponse(최고에요, 2L) + , new UserReviewResponse(별로에요, 3L)); - given(userRepository.countUserReviewsByUserId(anyLong())).willReturn(response); + given(userRepository.findById(anyLong())).willReturn(Optional.of(existUser)); + given(userRepository.countUserReviewsByUser(any(User.class))).willReturn(response); // when var result = userService.getUserReviews(userId); // then - assertThat(result).hasSize(2); - assertThat(result.get(0).review()).isEqualTo(최고에요); - assertThat(result.get(0).count()).isEqualTo(2L); - assertThat(result.get(1).review()).isEqualTo(별로에요); - assertThat(result.get(1).count()).isEqualTo(3L); + assertThat(result.reviews()).hasSize(2); + assertThat(result.reviews().get(0).review()).isEqualTo(최고에요); + assertThat(result.reviews().get(0).count()).isEqualTo(2L); + assertThat(result.reviews().get(1).review()).isEqualTo(별로에요); - verify(userRepository, times(1)).countUserReviewsByUserId(anyLong()); + verify(userRepository, times(1)).countUserReviewsByUser(any(User.class)); } } } diff --git a/src/test/java/net/teumteum/user/domain/UserRepositoryTest.java b/src/test/java/net/teumteum/user/domain/UserRepositoryTest.java index 59d607b..a046f11 100644 --- a/src/test/java/net/teumteum/user/domain/UserRepositoryTest.java +++ b/src/test/java/net/teumteum/user/domain/UserRepositoryTest.java @@ -7,7 +7,7 @@ import jakarta.persistence.EntityManager; import java.util.Optional; import net.teumteum.core.config.AppConfig; -import net.teumteum.user.domain.response.UserReviewsResponse; +import net.teumteum.user.domain.response.UserReviewResponse; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; @@ -85,13 +85,14 @@ void Count_user_reviews_by_user_id() { entityManager.clear(); // when - var result = userRepository.countUserReviewsByUserId(id); + var result = userRepository.countUserReviewsByUser(existUser); // then Assertions.assertThat(result) .isNotEmpty() .hasSize(3) - .extracting(UserReviewsResponse::review, UserReviewsResponse::count) + .extracting(UserReviewResponse::review, + UserReviewResponse::count) .contains( Assertions.tuple(최고에요, 3L), Assertions.tuple(별로에요, 1L), From d7f3a3e44c890ba7731e0d455c12e45646407ca8 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 14 Feb 2024 22:58:46 +0900 Subject: [PATCH 4/7] =?UTF-8?q?docs:=20readme=20=EC=9E=91=EC=84=B1=20(#222?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af97483..7fd4c45 100644 --- a/README.md +++ b/README.md @@ -1 +1,38 @@ -# tmtm-server \ No newline at end of file + + +# Teum-Teum + +> 사람 사이의 **틈**을 이어주는 IT 커리어 네트워킹 서비스 `repo:server` + +[![download](https://img.shields.io/badge/playstore-download-brightgreen?style=for-the-badge&logo=google&logoColor=white&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) ![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF) + +## 👋 Introduction + +![Behance](https://img.shields.io/badge/Behance-1769ff?style=for-the-badge&logo=behance&logoColor=white) + +## 🌐 Architecture + +## ⚒️ Tech Stack + + ![SpringBoot](https://img.shields.io/badge/springboot-%236DB33F.svg?style=for-the-badge&logo=springboot&logoColor=white)![spring_data_JPA](https://img.shields.io/badge/spring_data_JPA-%236DB33F?style=for-the-badge&logo=databricks&logoColor=white)![SpringSecurity](https://img.shields.io/badge/spring_security-%236DB33F.svg?style=for-the-badge&logo=springsecurity&logoColor=white)![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white) + + ![junit5](https://img.shields.io/badge/junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)![test_containers](https://img.shields.io/badge/test_containers-328ba3?style=for-the-badge&logo=reasonstudios&logoColor=white) + + ![MySQL](https://img.shields.io/badge/mysql-4479A1.svg?style=for-the-badge&logo=mysql&logoColor=white)![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white)![Firebase](https://img.shields.io/badge/Firebase-039BE5?style=for-the-badge&logo=Firebase&logoColor=white)![flyway](https://img.shields.io/badge/flyway-CC0200?style=for-the-badge&logo=flyway&logoColor=white) + + ![Amazon Ec2](https://img.shields.io/badge/amazon_ec2-FF9900.svg?style=for-the-badge&logo=amazonec2&logoColor=white)![Amazon S3](https://img.shields.io/badge/AWS_S3-569A31.svg?style=for-the-badge&logo=amazons3&logoColor=white)![Amazon RDS](https://img.shields.io/badge/amazon_RDS-527FFF.svg?style=for-the-badge&logo=amazonrds&logoColor=white)![Amazon ElastiCache](https://img.shields.io/badge/amazon_elasticache-FF9900.svg?style=for-the-badge&logo=amazondocumentdb&logoColor=white)![Nginx](https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white) + + ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)![github container](https://img.shields.io/badge/github_container-181717.svg?style=for-the-badge&logo=github&logoColor=white)![squarespace](https://img.shields.io/badge/squarespace-000000?style=for-the-badge&logo=squarespace&logoColor=white) + + ![SonarCloud](https://img.shields.io/badge/SonarCloud-F3702A?style=for-the-badge&logo=SonarCloud&logoColor=white) + + ![ChatGPT](https://img.shields.io/badge/chatGPT-74aa9c?style=for-the-badge&logo=openai&logoColor=white) + + ![sentry](https://img.shields.io/badge/sentry-362D59?style=for-the-badge&logo=sentry&logoColor=white) + +## 👥 Members + +| Server | Server | Server | +|:----------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:| +| | | | +| [choidongkuen](https://github.com/choidongkuen) | [xb205](https://github.com/devxb) | [ddingmin](https://github.com/ddingmin) | From f5603e0cd6c42bf2f038f46308b982b7add87009 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 14 Feb 2024 22:59:33 +0900 Subject: [PATCH 5/7] =?UTF-8?q?docs:=20readme=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7fd4c45..d2991fb 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,31 @@ [![download](https://img.shields.io/badge/playstore-download-brightgreen?style=for-the-badge&logo=google&logoColor=white&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) ![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF) -## 👋 Introduction +--- + +

+ MOBILE_1 + MOBILE_2 +

+

+ MOBILE_3 + MOBILE_4 +

+

+ MOBILE_5 + MOBILE_6 +

+

+ MOBILE_7 + MOBILE_8 +

![Behance](https://img.shields.io/badge/Behance-1769ff?style=for-the-badge&logo=behance&logoColor=white) ## 🌐 Architecture +

+ +

## ⚒️ Tech Stack @@ -30,7 +50,7 @@ ![sentry](https://img.shields.io/badge/sentry-362D59?style=for-the-badge&logo=sentry&logoColor=white) -## 👥 Members +## 👥 Contributors | Server | Server | Server | |:----------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:| From e3552eb54a2b978b76f63b536e177ab253785217 Mon Sep 17 00:00:00 2001 From: ddingmin Date: Wed, 14 Feb 2024 23:49:18 +0900 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20readme=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d2991fb..31a0898 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ > 사람 사이의 **틈**을 이어주는 IT 커리어 네트워킹 서비스 `repo:server` -[![download](https://img.shields.io/badge/playstore-download-brightgreen?style=for-the-badge&logo=google&logoColor=white&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) ![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF) +![Build](https://img.shields.io/github/actions/workflow/status/depromeet/teum-teum-server/integration-tester.yml?branch=develop&style=for-the-badge&logo=github&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/test_success_density/depromeet_teum-teum-server?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/sonar/quality_gate/depromeet_teum-teum-server/develop?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonar&logoColor=white&color=36B2FF) ![](https://img.shields.io/github/v/release/depromeet/teum-teum-server?include_prereleases&style=for-the-badge&color=36B2FF) + +[![download](https://img.shields.io/badge/playstore-download-brightgreen?style=social&logo=googleplay&color=36B2FF)](https://play.google.com/store/apps/details?id=com.teumteum.teumteum&pcampaignid=web_share) [![instagram](https://img.shields.io/badge/instagram-click-brightgreen?style=social&logo=instagram&color=36B2FF)](https://www.instagram.com/teumteum_official/) [![behance](https://img.shields.io/badge/behance-click-brightgreen?style=social&logo=behance&color=36B2FF)](https://www.behance.net/gallery/191510163/%08TEUMTEUM-IT-Career-Growth-Networking-Service) --- @@ -25,30 +27,25 @@ MOBILE_8

-![Behance](https://img.shields.io/badge/Behance-1769ff?style=for-the-badge&logo=behance&logoColor=white) - ## 🌐 Architecture +

## ⚒️ Tech Stack - ![SpringBoot](https://img.shields.io/badge/springboot-%236DB33F.svg?style=for-the-badge&logo=springboot&logoColor=white)![spring_data_JPA](https://img.shields.io/badge/spring_data_JPA-%236DB33F?style=for-the-badge&logo=databricks&logoColor=white)![SpringSecurity](https://img.shields.io/badge/spring_security-%236DB33F.svg?style=for-the-badge&logo=springsecurity&logoColor=white)![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white) - - ![junit5](https://img.shields.io/badge/junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)![test_containers](https://img.shields.io/badge/test_containers-328ba3?style=for-the-badge&logo=reasonstudios&logoColor=white) - - ![MySQL](https://img.shields.io/badge/mysql-4479A1.svg?style=for-the-badge&logo=mysql&logoColor=white)![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white)![Firebase](https://img.shields.io/badge/Firebase-039BE5?style=for-the-badge&logo=Firebase&logoColor=white)![flyway](https://img.shields.io/badge/flyway-CC0200?style=for-the-badge&logo=flyway&logoColor=white) +![SpringBoot](https://img.shields.io/badge/springboot-%236DB33F.svg?style=for-the-badge&logo=springboot&logoColor=white)![spring_data_JPA](https://img.shields.io/badge/spring_data_JPA-%236DB33F?style=for-the-badge&logo=databricks&logoColor=white)![SpringSecurity](https://img.shields.io/badge/spring_security-%236DB33F.svg?style=for-the-badge&logo=springsecurity&logoColor=white) ![Gradle](https://img.shields.io/badge/Gradle-02303A.svg?style=for-the-badge&logo=Gradle&logoColor=white) - ![Amazon Ec2](https://img.shields.io/badge/amazon_ec2-FF9900.svg?style=for-the-badge&logo=amazonec2&logoColor=white)![Amazon S3](https://img.shields.io/badge/AWS_S3-569A31.svg?style=for-the-badge&logo=amazons3&logoColor=white)![Amazon RDS](https://img.shields.io/badge/amazon_RDS-527FFF.svg?style=for-the-badge&logo=amazonrds&logoColor=white)![Amazon ElastiCache](https://img.shields.io/badge/amazon_elasticache-FF9900.svg?style=for-the-badge&logo=amazondocumentdb&logoColor=white)![Nginx](https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white) +![junit5](https://img.shields.io/badge/junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)![test_containers](https://img.shields.io/badge/test_containers-328ba3?style=for-the-badge&logo=reasonstudios&logoColor=white) ![gatling](https://img.shields.io/badge/gatling-FF9E2A?style=for-the-badge&logo=gatling&logoColor=white) - ![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)![github container](https://img.shields.io/badge/github_container-181717.svg?style=for-the-badge&logo=github&logoColor=white)![squarespace](https://img.shields.io/badge/squarespace-000000?style=for-the-badge&logo=squarespace&logoColor=white) +![MySQL](https://img.shields.io/badge/mysql-4479A1.svg?style=for-the-badge&logo=mysql&logoColor=white)![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white)![Firebase](https://img.shields.io/badge/Firebase-039BE5?style=for-the-badge&logo=Firebase&logoColor=white) ![flyway](https://img.shields.io/badge/flyway-CC0200?style=for-the-badge&logo=flyway&logoColor=white) - ![SonarCloud](https://img.shields.io/badge/SonarCloud-F3702A?style=for-the-badge&logo=SonarCloud&logoColor=white) +![Amazon Ec2](https://img.shields.io/badge/amazon_ec2-FF9900.svg?style=for-the-badge&logo=amazonec2&logoColor=white)![Amazon S3](https://img.shields.io/badge/AWS_S3-569A31.svg?style=for-the-badge&logo=amazons3&logoColor=white)![Amazon RDS](https://img.shields.io/badge/amazon_RDS-527FFF.svg?style=for-the-badge&logo=amazonrds&logoColor=white)![Amazon ElastiCache](https://img.shields.io/badge/amazon_elasticache-FF9900.svg?style=for-the-badge&logo=amazondocumentdb&logoColor=white)![Nginx](https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white) - ![ChatGPT](https://img.shields.io/badge/chatGPT-74aa9c?style=for-the-badge&logo=openai&logoColor=white) +![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)![github container](https://img.shields.io/badge/github_container-181717.svg?style=for-the-badge&logo=github&logoColor=white) ![squarespace](https://img.shields.io/badge/squarespace-000000?style=for-the-badge&logo=squarespace&logoColor=white) - ![sentry](https://img.shields.io/badge/sentry-362D59?style=for-the-badge&logo=sentry&logoColor=white) +![SonarCloud](https://img.shields.io/badge/SonarCloud-F3702A?style=for-the-badge&logo=SonarCloud&logoColor=white) ![sentry](https://img.shields.io/badge/sentry-362D59?style=for-the-badge&logo=sentry&logoColor=white) ![ChatGPT](https://img.shields.io/badge/chatGPT-74aa9c?style=for-the-badge&logo=openai&logoColor=white) ## 👥 Contributors From 97ee24618c3c0d08e2355e46eba95ab537483bd4 Mon Sep 17 00:00:00 2001 From: devxb Date: Thu, 15 Feb 2024 21:23:51 +0900 Subject: [PATCH 7/7] =?UTF-8?q?test:=20QA=EC=9A=A9=20EndMeetingAlerted?= =?UTF-8?q?=EB=A5=BC=20=EB=B0=9C=ED=96=89=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meeting/service/MeetingAlertPublisher.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/teumteum/meeting/service/MeetingAlertPublisher.java b/src/main/java/net/teumteum/meeting/service/MeetingAlertPublisher.java index 402c057..858650e 100644 --- a/src/main/java/net/teumteum/meeting/service/MeetingAlertPublisher.java +++ b/src/main/java/net/teumteum/meeting/service/MeetingAlertPublisher.java @@ -2,7 +2,6 @@ import java.time.LocalDateTime; import java.time.ZoneId; -import java.time.ZonedDateTime; import lombok.RequiredArgsConstructor; import net.teumteum.meeting.domain.BeforeMeetingAlerted; import net.teumteum.meeting.domain.EndMeetingAlerted; @@ -49,4 +48,21 @@ public void alertEndMeeting() { new EndMeetingAlerted(meeting.getId(), meeting.getTitle(), meeting.getParticipantUserIds()) )); } + + @Scheduled(cron = EVERY_ONE_MINUTES) + public void alertEndMeetingForQa() { + var today = LocalDateTime.now(ZoneId.of("Asia/Seoul")) + .withNano(0) + .withSecond(0) + .withMinute(0) + .withHour(0); + + var future = today.plusDays(365); + var yesterday = today.minusDays(365); + + var alertTargets = meetingRepository.findAlertMeetings(yesterday, future); + alertTargets.forEach(meeting -> eventPublisher.publishEvent( + new EndMeetingAlerted(meeting.getId(), meeting.getTitle(), meeting.getParticipantUserIds()) + )); + } }