From 48a4af47299231041ed71da10b814d8439559118 Mon Sep 17 00:00:00 2001 From: sunandrabbit Date: Fri, 15 Nov 2024 15:53:48 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=ED=83=9C=EC=8A=A4=ED=81=AC=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=EC=8B=9C=20=EC=82=AD=EC=A0=9C=EB=90=9C=20?= =?UTF-8?q?=EA=B0=92=EB=8F=84=20=EC=A1=B0=ED=9A=8C=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EB=B9=84=EA=B5=90=ED=95=98=EB=8D=98=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/team1/be/seamless/service/ProjectService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/team1/be/seamless/service/ProjectService.java b/src/main/java/team1/be/seamless/service/ProjectService.java index e80fa46..8c8d84d 100644 --- a/src/main/java/team1/be/seamless/service/ProjectService.java +++ b/src/main/java/team1/be/seamless/service/ProjectService.java @@ -173,6 +173,7 @@ public ProjectDetail updateProject(long projectId, ProjectUpdate update, String //종료일이 가장 늦은 태스크보다 종료일을 이전으로 업데이드 하면 안됨 projectEntity.getTaskEntities().stream() + .filter(taskEntity -> taskEntity.getIsDeleted().equals(false)) .map(TaskEntity::getEndDate) .max(Comparator.naturalOrder()) .ifPresent(lastEndDate -> { From cc8b5c032f57a8d4acc087023473fd053f1351ee Mon Sep 17 00:00:00 2001 From: Kim-DongHyuk <80240164+Kdonghs@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:54:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?test:=20inti=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team1/be/seamless/init/MemberCreator.java | 12 +++++ .../be/seamless/init/ProjectCreator.java | 19 ++------ .../team1/be/seamless/init/TaskCreator.java | 46 ++++++++++++++++++- .../team1/be/seamless/init/UserCreator.java | 2 +- 4 files changed, 63 insertions(+), 16 deletions(-) diff --git a/src/main/java/team1/be/seamless/init/MemberCreator.java b/src/main/java/team1/be/seamless/init/MemberCreator.java index 6b8df70..88f728c 100644 --- a/src/main/java/team1/be/seamless/init/MemberCreator.java +++ b/src/main/java/team1/be/seamless/init/MemberCreator.java @@ -28,6 +28,18 @@ public void creator() { MemberRequestDTO.CreateMember member3 = new MemberRequestDTO.CreateMember("ex3@gmail.com", "sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "도헌"); memberService.createMember(member3); + + MemberRequestDTO.CreateMember member4 = new MemberRequestDTO.CreateMember("ex4@gmail.com", + "sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "서영"); + memberService.createMember(member4); + + MemberRequestDTO.CreateMember member5 = new MemberRequestDTO.CreateMember("ex5@gmail.com", + "sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "채연"); + memberService.createMember(member5); + + MemberRequestDTO.CreateMember member6 = new MemberRequestDTO.CreateMember("ex6@gmail.com", + "sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "정윤"); + memberService.createMember(member6); } } diff --git a/src/main/java/team1/be/seamless/init/ProjectCreator.java b/src/main/java/team1/be/seamless/init/ProjectCreator.java index 95ced36..fd301b0 100644 --- a/src/main/java/team1/be/seamless/init/ProjectCreator.java +++ b/src/main/java/team1/be/seamless/init/ProjectCreator.java @@ -21,22 +21,13 @@ public ProjectCreator(ProjectService projectService) { public void creator() { projectService.createProject( new ProjectCreate( - "프로젝트 이름1", - "프로젝트 설명1", - "https://example.com/image1.jpg", + "테스트 프로젝트", + "카카오테크캠퍼스", + "https://ca.slack-edge.com/T06MHGBCEKG-U06M9KTL9GX-e92c9472326e-512", List.of(1L, 2L, 3L), - LocalDateTime.of(2024, 10, 1, 0, 0, 0), + LocalDateTime.of(2024, 4, 1, 0, 0, 0), LocalDateTime.of(2025, 10, 1, 0, 0, 0) - ), "user1@google.com", Role.USER.getKey()); + ), "kakaotechcampus.mentor@gmail.com", Role.USER.getKey()); - projectService.createProject( - new ProjectCreate( - "프로젝트 이름2", - "프로젝트 설명2", - "https://example.com/image2.jpg", - List.of(1L, 2L, 3L), - LocalDateTime.of(2024, 11, 11, 0, 0, 0), - LocalDateTime.of(2025, 11, 11, 0, 0, 0) - ), "user1@google.com", Role.USER.getKey()); } } diff --git a/src/main/java/team1/be/seamless/init/TaskCreator.java b/src/main/java/team1/be/seamless/init/TaskCreator.java index b5115c7..b2c14d3 100644 --- a/src/main/java/team1/be/seamless/init/TaskCreator.java +++ b/src/main/java/team1/be/seamless/init/TaskCreator.java @@ -23,7 +23,51 @@ public void creator() { TaskCreate task1 = new TaskCreate("태스크1", "첫번째 태스크입니다.", 1L, LocalDateTime.of(2024, 10, 10, 0, 0), LocalDateTime.of(2025, 9, 3, 0, 0), Priority.HIGH, TaskStatus.IN_PROGRESS, 1); - taskService.createTask(1L, task1); + + TaskCreate task2 = new TaskCreate("태스크2", "두번째 태스크입니다.", null, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.LOW, TaskStatus.IN_PROGRESS, 1); + taskService.createTask(1L, task2); + + TaskCreate task3 = new TaskCreate("태스크3", "세번째 태스크입니다.", 2L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.MEDIUM, TaskStatus.PENDING, 1); + taskService.createTask(1L, task3); + + TaskCreate task4 = new TaskCreate("태스크4", "네번째 태스크입니다.", 3L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.LOW, TaskStatus.PENDING, 1); + taskService.createTask(1L, task4); + + TaskCreate task5 = new TaskCreate("태스크5", "다섯번째 태스크입니다.", 4L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.HIGH, TaskStatus.IN_PROGRESS, 1); + taskService.createTask(1L, task5); + + TaskCreate task6 = new TaskCreate("태스크6", "여섯번째 태스크입니다.", 5L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.MEDIUM, TaskStatus.IN_PROGRESS, 1); + taskService.createTask(1L, task6); + + TaskCreate task7 = new TaskCreate("태스크7", "일곱번째 태스크입니다.", null, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.MEDIUM, TaskStatus.COMPLETED, 1); + taskService.createTask(1L, task7); + + TaskCreate task8 = new TaskCreate("태스크8", "여덟번째 태스크입니다.", 1L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.LOW, TaskStatus.IN_PROGRESS, 1); + taskService.createTask(1L, task8); + + TaskCreate task9 = new TaskCreate("태스크9", "아홉번째 태스크입니다.", null, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.MEDIUM, TaskStatus.PENDING, 1); + taskService.createTask(1L, task9); + + TaskCreate task10 = new TaskCreate("태스크10", "열번째 태스크입니다.", 4L, + LocalDateTime.of(2024, 10, 10, 0, 0), + LocalDateTime.of(2025, 9, 3, 0, 0), Priority.MEDIUM, TaskStatus.COMPLETED, 1); + taskService.createTask(1L, task10); } } diff --git a/src/main/java/team1/be/seamless/init/UserCreator.java b/src/main/java/team1/be/seamless/init/UserCreator.java index e94ff18..440c3a0 100644 --- a/src/main/java/team1/be/seamless/init/UserCreator.java +++ b/src/main/java/team1/be/seamless/init/UserCreator.java @@ -16,7 +16,7 @@ public UserCreator(UserService userService) { } public void creator() { - userService.createUser(new UserSimple("사용자1", "user1@google.com", "https://user1Image.jpg")); + userService.createUser(new UserSimple("테스트 계정", "kakaotechcampus.mentor@gmail.com", "https://ca.slack-edge.com/T06MHGBCEKG-U06M9KTL9GX-e92c9472326e-512")); userService.createUser(new UserSimple("사용자2", "user2@google.com", "https://user2Image.jpg")); userService.createUser(new UserSimple("사용자3", "user3@google.com", "https://user3Image.jpg")); }