Skip to content

Commit

Permalink
Merge pull request #155 from kakao-tech-campus-2nd-step3/weekly
Browse files Browse the repository at this point in the history
프로젝트 수정 오류 해결
  • Loading branch information
sunandrabbit authored Nov 15, 2024
2 parents 799ee5a + 9ca0182 commit 2ce8e82
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 16 deletions.
12 changes: 12 additions & 0 deletions src/main/java/team1/be/seamless/init/MemberCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ public void creator() {
MemberRequestDTO.CreateMember member3 = new MemberRequestDTO.CreateMember("[email protected]",
"sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "도헌");
memberService.createMember(member3);

MemberRequestDTO.CreateMember member4 = new MemberRequestDTO.CreateMember("[email protected]",
"sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "서영");
memberService.createMember(member4);

MemberRequestDTO.CreateMember member5 = new MemberRequestDTO.CreateMember("[email protected]",
"sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "채연");
memberService.createMember(member5);

MemberRequestDTO.CreateMember member6 = new MemberRequestDTO.CreateMember("[email protected]",
"sv_XKCT5j5Sm0msQw-mEAmstJ5tq9uBh6c8_QLhzKGo=", "정윤");
memberService.createMember(member6);
}

}
19 changes: 5 additions & 14 deletions src/main/java/team1/be/seamless/init/ProjectCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
), "[email protected]", Role.USER.getKey());
}
}
46 changes: 45 additions & 1 deletion src/main/java/team1/be/seamless/init/TaskCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/main/java/team1/be/seamless/init/UserCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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", "[email protected]", "https://user2Image.jpg"));
userService.createUser(new UserSimple("사용자3", "[email protected]", "https://user3Image.jpg"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down

0 comments on commit 2ce8e82

Please sign in to comment.