From c618cadd5923771c97d6f4d3c34473d45425ca15 Mon Sep 17 00:00:00 2001 From: bellmin Date: Sun, 24 Nov 2024 18:14:07 +0900 Subject: [PATCH] chore: spotlessApply --- eeos/logs/2024-04-01/eeos.log | 0 eeos/logs/{2024-03-15 => 2024-11-24}/eeos.log | 0 .../eeos/auth/persistence/AccountEntity.java | 14 ++++++++-- .../auth/persistence/OAuthMemberEntity.java | 7 ++++- .../controller/AuthController.java | 7 ++++- .../application/model/CommentModel.java | 5 +++- .../comment/persistence/CommentEntity.java | 13 +++++++-- .../controller/CommentController.java | 18 ++++++++++-- .../comment/presentation/docs/CommentApi.java | 11 ++++++-- .../controller/MemberController.java | 18 ++++++++++-- .../member/presentation/docs/MemberApi.java | 9 ++++-- .../program/application/dto/PageResponse.java | 2 ++ .../application/dto/UpdateProgramRequest.java | 2 +- .../application/model/ProgramModel.java | 13 ++++++++- .../application/service/ProgramService.java | 10 ++++++- .../api/slack/chat/model/ChatPostModel.java | 5 +++- .../converter/ChatPostModelConverter.java | 5 +++- .../program/persistence/ProgramEntity.java | 7 ++++- .../controller/GuestProgramController.java | 9 ++++-- .../controller/ProgramController.java | 28 +++++++++++++++++-- .../program/presentation/docs/ProgramApi.java | 9 +++++- .../target/application/model/AttendModel.java | 7 ++--- .../application/service/AttendService.java | 7 +++-- .../persistence/PresentationEntity.java | 13 +++++++-- .../controller/AttendController.java | 7 ++++- .../application/dto/CreateTeamRequest.java | 6 +++- .../dto/UpdateTeamStatusRequest.java | 6 +++- .../team/application/model/TeamModel.java | 6 +++- .../eeos/team/persistence/TeamEntity.java | 19 +++++++++---- .../eeos/team/persistence/TeamRepository.java | 1 - .../controller/TeamController.java | 9 +++++- 31 files changed, 223 insertions(+), 50 deletions(-) delete mode 100644 eeos/logs/2024-04-01/eeos.log rename eeos/logs/{2024-03-15 => 2024-11-24}/eeos.log (100%) diff --git a/eeos/logs/2024-04-01/eeos.log b/eeos/logs/2024-04-01/eeos.log deleted file mode 100644 index e69de29b..00000000 diff --git a/eeos/logs/2024-03-15/eeos.log b/eeos/logs/2024-11-24/eeos.log similarity index 100% rename from eeos/logs/2024-03-15/eeos.log rename to eeos/logs/2024-11-24/eeos.log diff --git a/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/AccountEntity.java b/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/AccountEntity.java index 8eb79e1e..765cca3b 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/AccountEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/AccountEntity.java @@ -1,8 +1,18 @@ package com.blackcompany.eeos.auth.persistence; import com.blackcompany.eeos.common.persistence.BaseEntity; -import javax.persistence.*; -import lombok.*; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.Table; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; @Getter diff --git a/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/OAuthMemberEntity.java b/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/OAuthMemberEntity.java index 0af86e8b..60f535eb 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/OAuthMemberEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/auth/persistence/OAuthMemberEntity.java @@ -7,7 +7,12 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; -import lombok.*; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; @Getter diff --git a/eeos/src/main/java/com/blackcompany/eeos/auth/presentation/controller/AuthController.java b/eeos/src/main/java/com/blackcompany/eeos/auth/presentation/controller/AuthController.java index 413b9810..0196fdf3 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/auth/presentation/controller/AuthController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/auth/presentation/controller/AuthController.java @@ -23,7 +23,12 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseCookie; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +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; @RestController @RequestMapping("/api/auth") diff --git a/eeos/src/main/java/com/blackcompany/eeos/comment/application/model/CommentModel.java b/eeos/src/main/java/com/blackcompany/eeos/comment/application/model/CommentModel.java index ee14594f..b43fb42e 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/comment/application/model/CommentModel.java +++ b/eeos/src/main/java/com/blackcompany/eeos/comment/application/model/CommentModel.java @@ -6,7 +6,10 @@ import com.blackcompany.eeos.common.support.AbstractModel; import com.blackcompany.eeos.program.application.model.AccessRights; import java.sql.Timestamp; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.ToString; @AllArgsConstructor @ToString diff --git a/eeos/src/main/java/com/blackcompany/eeos/comment/persistence/CommentEntity.java b/eeos/src/main/java/com/blackcompany/eeos/comment/persistence/CommentEntity.java index 1b4813bf..4e617fd1 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/comment/persistence/CommentEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/comment/persistence/CommentEntity.java @@ -1,8 +1,17 @@ package com.blackcompany.eeos.comment.persistence; import com.blackcompany.eeos.common.persistence.BaseEntity; -import javax.persistence.*; -import lombok.*; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; diff --git a/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/controller/CommentController.java b/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/controller/CommentController.java index 9e75c60c..37937b4f 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/controller/CommentController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/controller/CommentController.java @@ -1,7 +1,11 @@ package com.blackcompany.eeos.comment.presentation.controller; import com.blackcompany.eeos.auth.presentation.support.Member; -import com.blackcompany.eeos.comment.application.dto.*; +import com.blackcompany.eeos.comment.application.dto.CommandCommentResponse; +import com.blackcompany.eeos.comment.application.dto.CreateCommentRequest; +import com.blackcompany.eeos.comment.application.dto.QueryCommentResponse; +import com.blackcompany.eeos.comment.application.dto.QueryCommentsResponse; +import com.blackcompany.eeos.comment.application.dto.UpdateCommentRequest; import com.blackcompany.eeos.comment.application.dto.converter.CommentResponseConverter; import com.blackcompany.eeos.comment.application.model.CommentModel; import com.blackcompany.eeos.comment.application.usecase.CreateCommentUsecase; @@ -10,14 +14,22 @@ import com.blackcompany.eeos.comment.application.usecase.UpdateCommentUsecase; import com.blackcompany.eeos.comment.presentation.docs.CommentApi; import com.blackcompany.eeos.common.presentation.respnose.ApiResponse; -import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.*; +import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; import com.blackcompany.eeos.common.presentation.respnose.ApiResponseGenerator; import com.blackcompany.eeos.common.presentation.respnose.MessageCode; import java.util.List; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +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; @RestController @RequestMapping("api/comments") diff --git a/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/docs/CommentApi.java b/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/docs/CommentApi.java index f509ad9d..a5cba4e6 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/docs/CommentApi.java +++ b/eeos/src/main/java/com/blackcompany/eeos/comment/presentation/docs/CommentApi.java @@ -1,12 +1,17 @@ package com.blackcompany.eeos.comment.presentation.docs; -import com.blackcompany.eeos.comment.application.dto.*; +import com.blackcompany.eeos.comment.application.dto.CommandCommentResponse; +import com.blackcompany.eeos.comment.application.dto.CreateCommentRequest; +import com.blackcompany.eeos.comment.application.dto.QueryCommentsResponse; +import com.blackcompany.eeos.comment.application.dto.UpdateCommentRequest; import com.blackcompany.eeos.common.presentation.respnose.ApiResponse; -import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.*; +import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; @Tag(name = "질문 및 댓글", description = "댓글 및 질문 관련 API") public interface CommentApi { diff --git a/eeos/src/main/java/com/blackcompany/eeos/member/presentation/controller/MemberController.java b/eeos/src/main/java/com/blackcompany/eeos/member/presentation/controller/MemberController.java index b9c267bc..799d2183 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/member/presentation/controller/MemberController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/member/presentation/controller/MemberController.java @@ -5,13 +5,25 @@ import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; import com.blackcompany.eeos.common.presentation.respnose.ApiResponseGenerator; import com.blackcompany.eeos.common.presentation.respnose.MessageCode; -import com.blackcompany.eeos.member.application.dto.*; -import com.blackcompany.eeos.member.application.usecase.*; +import com.blackcompany.eeos.member.application.dto.ChangeActiveStatusRequest; +import com.blackcompany.eeos.member.application.dto.CommandMemberResponse; +import com.blackcompany.eeos.member.application.dto.QueryMemberResponse; +import com.blackcompany.eeos.member.application.dto.QueryMembersResponse; +import com.blackcompany.eeos.member.application.usecase.ChangeActiveStatusUsecase; +import com.blackcompany.eeos.member.application.usecase.GetMemberByActiveStatus; +import com.blackcompany.eeos.member.application.usecase.GetMembersByActiveStatus; import com.blackcompany.eeos.member.presentation.docs.MemberApi; import javax.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +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; @RestController @RequiredArgsConstructor diff --git a/eeos/src/main/java/com/blackcompany/eeos/member/presentation/docs/MemberApi.java b/eeos/src/main/java/com/blackcompany/eeos/member/presentation/docs/MemberApi.java index 312bfdb6..2e08f4a8 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/member/presentation/docs/MemberApi.java +++ b/eeos/src/main/java/com/blackcompany/eeos/member/presentation/docs/MemberApi.java @@ -3,11 +3,16 @@ import com.blackcompany.eeos.auth.presentation.support.Member; import com.blackcompany.eeos.common.presentation.respnose.ApiResponse; import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; -import com.blackcompany.eeos.member.application.dto.*; +import com.blackcompany.eeos.member.application.dto.ChangeActiveStatusRequest; +import com.blackcompany.eeos.member.application.dto.CommandMemberResponse; +import com.blackcompany.eeos.member.application.dto.QueryMemberResponse; +import com.blackcompany.eeos.member.application.dto.QueryMembersResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; @Tag(name = "멤버", description = "멤버에 관한 API") public interface MemberApi { diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/PageResponse.java b/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/PageResponse.java index ac11660e..df58f070 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/PageResponse.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/PageResponse.java @@ -16,8 +16,10 @@ public class PageResponse { /** 페이지를 구성하는 일정 수의 크기 */ private int size; + /** 데이터를 가져온 페이지 번호 */ private int page; + /** size 크기에 맞춰 페이징했을 때 나오는 총 페이지 개수 */ private int totalPage; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/UpdateProgramRequest.java b/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/UpdateProgramRequest.java index 1bff9550..2cb2c02e 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/UpdateProgramRequest.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/application/dto/UpdateProgramRequest.java @@ -1,6 +1,6 @@ package com.blackcompany.eeos.program.application.dto; -import com.blackcompany.eeos.program.application.dto.CreateProgramRequest.*; +import com.blackcompany.eeos.program.application.dto.CreateProgramRequest.Team; import java.sql.Timestamp; import java.util.List; import javax.validation.constraints.NotNull; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/application/model/ProgramModel.java b/eeos/src/main/java/com/blackcompany/eeos/program/application/model/ProgramModel.java index d4b1fbdb..6f3cc5a6 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/application/model/ProgramModel.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/application/model/ProgramModel.java @@ -2,7 +2,18 @@ import com.blackcompany.eeos.common.support.AbstractModel; import com.blackcompany.eeos.common.utils.DateConverter; -import com.blackcompany.eeos.program.application.exception.*; +import com.blackcompany.eeos.program.application.exception.AlreadyEndProgramException; +import com.blackcompany.eeos.program.application.exception.DeniedProgramEditException; +import com.blackcompany.eeos.program.application.exception.DeniedProgramNotificationException; +import com.blackcompany.eeos.program.application.exception.IsNotGithubUrlException; +import com.blackcompany.eeos.program.application.exception.NotAllowedAttendStartException; +import com.blackcompany.eeos.program.application.exception.NotAllowedUpdatedProgramAttendException; +import com.blackcompany.eeos.program.application.exception.NotAllowedUpdatedProgramTypeException; +import com.blackcompany.eeos.program.application.exception.NotFoundProgramAttendMode; +import com.blackcompany.eeos.program.application.exception.NotFoundProgramCategoryException; +import com.blackcompany.eeos.program.application.exception.NotWeeklyProgramException; +import com.blackcompany.eeos.program.application.exception.OverDateException; +import com.blackcompany.eeos.program.application.exception.SameModeRequestException; import com.blackcompany.eeos.program.persistence.ProgramCategory; import com.blackcompany.eeos.program.persistence.ProgramType; import java.sql.Timestamp; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/application/service/ProgramService.java b/eeos/src/main/java/com/blackcompany/eeos/program/application/service/ProgramService.java index 425bc7e6..066b1b29 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/application/service/ProgramService.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/application/service/ProgramService.java @@ -25,7 +25,15 @@ import com.blackcompany.eeos.program.application.model.converter.ProgramEntityConverter; import com.blackcompany.eeos.program.application.model.converter.ProgramRequestConverter; import com.blackcompany.eeos.program.application.support.ProgramStatusServiceComposite; -import com.blackcompany.eeos.program.application.usecase.*; +import com.blackcompany.eeos.program.application.usecase.AttendModeChangeUsecase; +import com.blackcompany.eeos.program.application.usecase.CreateProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.DeleteProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.GetAccessRightUsecase; +import com.blackcompany.eeos.program.application.usecase.GetProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.GetProgramsUsecase; +import com.blackcompany.eeos.program.application.usecase.NotifyProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.ProgramQuitUsecase; +import com.blackcompany.eeos.program.application.usecase.UpdateProgramUsecase; import com.blackcompany.eeos.program.infra.api.slack.chat.service.ProgramNotifyServiceComposite; import com.blackcompany.eeos.program.persistence.ProgramCategory; import com.blackcompany.eeos.program.persistence.ProgramEntity; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/ChatPostModel.java b/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/ChatPostModel.java index 341197d7..6d868aa9 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/ChatPostModel.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/ChatPostModel.java @@ -2,7 +2,10 @@ import com.blackcompany.eeos.program.infra.api.slack.chat.model.ChatPostModel.Block; import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; @Getter @Builder diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/converter/ChatPostModelConverter.java b/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/converter/ChatPostModelConverter.java index aef0ce2b..c5726f43 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/converter/ChatPostModelConverter.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/infra/api/slack/chat/model/converter/ChatPostModelConverter.java @@ -3,9 +3,12 @@ import com.blackcompany.eeos.member.application.exception.NotFoundMemberException; import com.blackcompany.eeos.member.persistence.MemberRepository; import com.blackcompany.eeos.program.application.model.ProgramNotificationModel; -import com.blackcompany.eeos.program.infra.api.slack.chat.model.*; +import com.blackcompany.eeos.program.infra.api.slack.chat.model.BlockTypes; +import com.blackcompany.eeos.program.infra.api.slack.chat.model.ChatPostModel; import com.blackcompany.eeos.program.infra.api.slack.chat.model.ChatPostModel.Block; import com.blackcompany.eeos.program.infra.api.slack.chat.model.ChatPostModel.Text; +import com.blackcompany.eeos.program.infra.api.slack.chat.model.ProgramMessageAnnouncements; +import com.blackcompany.eeos.program.infra.api.slack.chat.model.TextTypes; import java.time.format.DateTimeFormatter; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/persistence/ProgramEntity.java b/eeos/src/main/java/com/blackcompany/eeos/program/persistence/ProgramEntity.java index 3c59fd06..5ac74ecb 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/persistence/ProgramEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/persistence/ProgramEntity.java @@ -12,7 +12,12 @@ import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.Table; -import lombok.*; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/GuestProgramController.java b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/GuestProgramController.java index a8a0d1d0..e845884a 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/GuestProgramController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/GuestProgramController.java @@ -7,11 +7,16 @@ import com.blackcompany.eeos.program.application.dto.PageResponse; import com.blackcompany.eeos.program.application.dto.QueryProgramResponse; import com.blackcompany.eeos.program.application.dto.QueryProgramsResponse; -import com.blackcompany.eeos.program.application.usecase.*; +import com.blackcompany.eeos.program.application.usecase.GetProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.GetProgramsUsecase; import com.blackcompany.eeos.program.presentation.docs.GuestProgramApi; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/ProgramController.java b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/ProgramController.java index 9787ece9..a8829a1a 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/ProgramController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/controller/ProgramController.java @@ -5,13 +5,35 @@ import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; import com.blackcompany.eeos.common.presentation.respnose.ApiResponseGenerator; import com.blackcompany.eeos.common.presentation.respnose.MessageCode; -import com.blackcompany.eeos.program.application.dto.*; -import com.blackcompany.eeos.program.application.usecase.*; +import com.blackcompany.eeos.program.application.dto.CommandProgramResponse; +import com.blackcompany.eeos.program.application.dto.CreateProgramRequest; +import com.blackcompany.eeos.program.application.dto.PageResponse; +import com.blackcompany.eeos.program.application.dto.ProgramSlackNotificationRequest; +import com.blackcompany.eeos.program.application.dto.QueryAccessRightResponse; +import com.blackcompany.eeos.program.application.dto.QueryProgramResponse; +import com.blackcompany.eeos.program.application.dto.QueryProgramsResponse; +import com.blackcompany.eeos.program.application.dto.UpdateProgramRequest; +import com.blackcompany.eeos.program.application.usecase.AttendModeChangeUsecase; +import com.blackcompany.eeos.program.application.usecase.CreateProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.DeleteProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.GetAccessRightUsecase; +import com.blackcompany.eeos.program.application.usecase.GetProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.GetProgramsUsecase; +import com.blackcompany.eeos.program.application.usecase.NotifyProgramUsecase; +import com.blackcompany.eeos.program.application.usecase.UpdateProgramUsecase; import com.blackcompany.eeos.program.presentation.docs.ProgramApi; import javax.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PatchMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +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; @RestController @RequiredArgsConstructor diff --git a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/docs/ProgramApi.java b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/docs/ProgramApi.java index a600dbca..30164556 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/program/presentation/docs/ProgramApi.java +++ b/eeos/src/main/java/com/blackcompany/eeos/program/presentation/docs/ProgramApi.java @@ -2,7 +2,14 @@ import com.blackcompany.eeos.common.presentation.respnose.ApiResponse; import com.blackcompany.eeos.common.presentation.respnose.ApiResponseBody.SuccessBody; -import com.blackcompany.eeos.program.application.dto.*; +import com.blackcompany.eeos.program.application.dto.CommandProgramResponse; +import com.blackcompany.eeos.program.application.dto.CreateProgramRequest; +import com.blackcompany.eeos.program.application.dto.PageResponse; +import com.blackcompany.eeos.program.application.dto.ProgramSlackNotificationRequest; +import com.blackcompany.eeos.program.application.dto.QueryAccessRightResponse; +import com.blackcompany.eeos.program.application.dto.QueryProgramResponse; +import com.blackcompany.eeos.program.application.dto.QueryProgramsResponse; +import com.blackcompany.eeos.program.application.dto.UpdateProgramRequest; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/eeos/src/main/java/com/blackcompany/eeos/target/application/model/AttendModel.java b/eeos/src/main/java/com/blackcompany/eeos/target/application/model/AttendModel.java index b45dc640..1c947aeb 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/target/application/model/AttendModel.java +++ b/eeos/src/main/java/com/blackcompany/eeos/target/application/model/AttendModel.java @@ -2,8 +2,6 @@ import com.blackcompany.eeos.common.application.model.MemberIdModel; import com.blackcompany.eeos.common.support.AbstractModel; -import com.blackcompany.eeos.target.application.exception.DeniedChangeAttendException; -import com.blackcompany.eeos.target.application.exception.DeniedSaveAttendException; import com.blackcompany.eeos.target.application.exception.NotSameBeforeAttendStatusException; import java.util.List; import java.util.stream.Collectors; @@ -35,8 +33,9 @@ public String getStatus() { return status.getStatus(); } - public boolean isAttended(){ - return (!this.status.equals(AttendStatus.NONRESPONSE) && !this.status.equals(AttendStatus.NONRELATED)); + public boolean isAttended() { + return (!this.status.equals(AttendStatus.NONRESPONSE) + && !this.status.equals(AttendStatus.NONRELATED)); } public boolean isRelated() { diff --git a/eeos/src/main/java/com/blackcompany/eeos/target/application/service/AttendService.java b/eeos/src/main/java/com/blackcompany/eeos/target/application/service/AttendService.java index 6dda6829..771a5e93 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/target/application/service/AttendService.java +++ b/eeos/src/main/java/com/blackcompany/eeos/target/application/service/AttendService.java @@ -130,9 +130,10 @@ public QueryAttendActiveStatusResponse getAttendInfo(Long programId, String acti } private void validateAttend(ProgramModel programModel, AttendModel attendModel) { - if (programModel.getAttendMode().equals(ProgramAttendMode.END)) throw new NotStartAttendException(); - if(attendModel.isAttended()) throw new DeniedChangeAttendException(); - if(!attendModel.isRelated()) throw new DeniedSaveAttendException(); + if (programModel.getAttendMode().equals(ProgramAttendMode.END)) + throw new NotStartAttendException(); + if (attendModel.isAttended()) throw new DeniedChangeAttendException(); + if (!attendModel.isRelated()) throw new DeniedSaveAttendException(); } private ProgramModel findProgram(final Long programId) { diff --git a/eeos/src/main/java/com/blackcompany/eeos/target/persistence/PresentationEntity.java b/eeos/src/main/java/com/blackcompany/eeos/target/persistence/PresentationEntity.java index f589ae3e..f7ea5c5a 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/target/persistence/PresentationEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/target/persistence/PresentationEntity.java @@ -1,8 +1,17 @@ package com.blackcompany.eeos.target.persistence; import com.blackcompany.eeos.common.persistence.BaseEntity; -import javax.persistence.*; -import lombok.*; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.Where; diff --git a/eeos/src/main/java/com/blackcompany/eeos/target/presentation/controller/AttendController.java b/eeos/src/main/java/com/blackcompany/eeos/target/presentation/controller/AttendController.java index 13482e08..f1091386 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/target/presentation/controller/AttendController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/target/presentation/controller/AttendController.java @@ -17,7 +17,12 @@ import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/CreateTeamRequest.java b/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/CreateTeamRequest.java index ba704567..8ef340f8 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/CreateTeamRequest.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/CreateTeamRequest.java @@ -2,7 +2,11 @@ import com.blackcompany.eeos.common.support.dto.AbstractRequestDto; import javax.validation.constraints.NotNull; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; @Getter @Setter diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/UpdateTeamStatusRequest.java b/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/UpdateTeamStatusRequest.java index bd824326..4685084f 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/UpdateTeamStatusRequest.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/application/dto/UpdateTeamStatusRequest.java @@ -1,7 +1,11 @@ package com.blackcompany.eeos.team.application.dto; import javax.validation.constraints.NotNull; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; @Getter @Setter diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/application/model/TeamModel.java b/eeos/src/main/java/com/blackcompany/eeos/team/application/model/TeamModel.java index e38047ae..e89d4d13 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/application/model/TeamModel.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/application/model/TeamModel.java @@ -1,7 +1,11 @@ package com.blackcompany.eeos.team.application.model; import com.blackcompany.eeos.common.support.AbstractModel; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; @Getter @Setter diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamEntity.java b/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamEntity.java index 4004494d..8d30ff95 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamEntity.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamEntity.java @@ -1,8 +1,19 @@ package com.blackcompany.eeos.team.persistence; import com.blackcompany.eeos.common.persistence.BaseEntity; -import javax.persistence.*; -import lombok.*; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.Table; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; @Getter @@ -30,9 +41,7 @@ public class TeamEntity extends BaseEntity { @Column(unique = true, name = ENTITY_PREFIX + "_name", nullable = false) private String name; - @Column( - name = ENTITY_PREFIX + "_status", - nullable = false) + @Column(name = ENTITY_PREFIX + "_status", nullable = false) @Builder.Default private boolean status = true; // 현학기 활동팀 1, 아니면 0 diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamRepository.java b/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamRepository.java index 0d4aba3c..167d141d 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamRepository.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/persistence/TeamRepository.java @@ -20,7 +20,6 @@ public interface TeamRepository extends JpaRepository { @Query("SELECT T FROM TeamEntity T WHERE T.status = true order by T.name") List findAllActiveTeams(); - @Query("SELECT T FROM TeamEntity T ORDER BY T.name") List findAllTeams(); } diff --git a/eeos/src/main/java/com/blackcompany/eeos/team/presetation/controller/TeamController.java b/eeos/src/main/java/com/blackcompany/eeos/team/presetation/controller/TeamController.java index c5bce8d3..9667a9ee 100644 --- a/eeos/src/main/java/com/blackcompany/eeos/team/presetation/controller/TeamController.java +++ b/eeos/src/main/java/com/blackcompany/eeos/team/presetation/controller/TeamController.java @@ -15,7 +15,14 @@ import javax.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +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; @RestController @RequiredArgsConstructor