Skip to content

Commit e82eed2

Browse files
authored
Merge pull request #415 from TaskFlow-CLAP/CLAP-324
CLAP-324 디렉토리 구조 정리 및 레이어간의 책임 분리
2 parents a140d39 + e760682 commit e82eed2

File tree

95 files changed

+398
-485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+398
-485
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
package clap.server.adapter.inbound.web.dto.task.request;
22

33
import io.swagger.v3.oas.annotations.media.Schema;
4+
import jakarta.validation.constraints.NotBlank;
5+
import jakarta.validation.constraints.NotNull;
46

57
import java.util.List;
68

79
public record FilterTeamStatusRequest(
8-
@Schema(description = "정렬 기준 (기여도순, 기본)", example = "기여도순")
9-
SortBy sortBy, // Enum 타입으로 수정
10+
@Schema(description = "정렬 기준 (기여도순, 기본)", example = "DEFAULT")
11+
@NotNull
12+
SortBy sortBy,
1013

1114
@Schema(description = "1차 카테고리 ID 목록", example = "[10, 20, 30]")
15+
@NotBlank
1216
List<Long> mainCategoryIds,
1317

1418
@Schema(description = "2차 카테고리 ID 목록", example = "[1, 2, 3]")
1519
List<Long> categoryIds,
1620

1721
@Schema(description = "작업 타이틀 검색", example = "타이틀1")
22+
@NotNull
1823
String taskTitle
1924
) {
20-
public FilterTeamStatusRequest {
21-
// 기본값 설정
22-
sortBy = (sortBy == null) ? SortBy.DEFAULT : sortBy; // 기본값을 DEFAULT로 설정
23-
mainCategoryIds = mainCategoryIds == null ? List.of() : mainCategoryIds;
24-
categoryIds = categoryIds == null ? List.of() : categoryIds;
25-
taskTitle = taskTitle == null ? "" : taskTitle;
26-
}
2725
}
2826

src/main/java/clap/server/adapter/inbound/web/dto/task/response/TeamTaskItemResponse.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ public static record LabelInfo(
2424
LabelColor labelColor
2525
) {
2626
}
27-
2827
}
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package clap.server.adapter.inbound.web.dto.task.response;
22

3-
import com.querydsl.core.annotations.QueryProjection;
4-
53
import java.util.List;
64

75
public record TeamTaskResponse(
@@ -14,8 +12,4 @@ public record TeamTaskResponse(
1412
int totalTaskCount,
1513
List<TeamTaskItemResponse> tasks
1614
) {
17-
@QueryProjection
18-
public TeamTaskResponse {
19-
tasks = (tasks == null) ? List.of() : tasks;
20-
}
2115
}

src/main/java/clap/server/adapter/inbound/web/history/CommandCommentController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
@Tag(name = "03. Task History", description = "히스토리 및 댓글 관련 API")
1919
@WebAdapter
20-
@RestController
2120
@RequiredArgsConstructor
2221
@RequestMapping("/api/comments")
2322
public class CommandCommentController {

src/main/java/clap/server/adapter/inbound/web/history/FindTaskHistoryController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
@Tag(name = "03. Task History")
2222
@WebAdapter
23-
@RestController
2423
@RequiredArgsConstructor
2524
@RequestMapping("/api/tasks")
2625
public class FindTaskHistoryController {

src/main/java/clap/server/adapter/inbound/web/history/PostCommentController.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@
2222

2323
@Tag(name = "03. Task History")
2424
@WebAdapter
25-
@RestController
2625
@RequiredArgsConstructor
27-
@RequestMapping("/api/comments")
26+
@RequestMapping("/api/tasks")
2827
public class PostCommentController {
2928

3029
private final SaveCommentUsecase saveCommentUsecase;
3130
private final SaveCommentAttachmentUsecase saveCommentAttachmentUsecase;
3231
@LogType(LogStatus.COMMENT_ADDED)
3332
@Operation(summary = "댓글 작성")
3433
@Parameter(name = "taskId", description = "댓글 작성할 작업 고유 ID", required = true, in = ParameterIn.PATH)
35-
@PostMapping("/{taskId}")
34+
@PostMapping("/{taskId}/comments")
3635
@Secured({"ROLE_MANAGER", "ROLE_USER"})
3736
public void createComment(
3837
@AuthenticationPrincipal SecurityUserDetails userInfo,
@@ -43,7 +42,7 @@ public void createComment(
4342

4443
@Operation(summary = "댓글 작성(첨부 파일)")
4544
@Parameter(name = "taskId", description = "댓글 작성할 작업 고유 ID", required = true, in = ParameterIn.PATH)
46-
@PostMapping(value = "/attachment/{taskId}", consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
45+
@PostMapping(value = "/{taskId}/comments/attachment", consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
4746
@Secured({"ROLE_MANAGER", "ROLE_USER"})
4847
public void createAttachmentComment(
4948
@AuthenticationPrincipal SecurityUserDetails userInfo,

src/main/java/clap/server/adapter/inbound/web/label/FindLabelController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
@Tag(name = "02. Task [조회]", description = "담당자 및 관리자 공통으로 사용")
2020
@WebAdapter
21-
@RestController
2221
@RequiredArgsConstructor
2322
@RequestMapping("/api/labels")
2423
public class FindLabelController {

src/main/java/clap/server/adapter/inbound/web/log/LogController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
@Tag(name = "05. Admin [로깅]")
2222
@WebAdapter
23-
@RestController
2423
@RequestMapping("/api/managements/logs")
2524
@RequiredArgsConstructor
2625
public class LogController {

src/main/java/clap/server/adapter/inbound/web/notification/FindNotificationController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
@Tag(name = "04. Notification")
2525
@WebAdapter
26-
@RestController
2726
@RequestMapping("/api/notifications")
2827
@RequiredArgsConstructor
2928
public class FindNotificationController {

src/main/java/clap/server/adapter/inbound/web/notification/ManagementNotificationController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
@Tag(name = "04. Notification")
1818
@WebAdapter
19-
@RestController
2019
@RequestMapping("/api/notifications")
2120
@RequiredArgsConstructor
2221
public class ManagementNotificationController {

0 commit comments

Comments
 (0)