Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record ApprovalTaskRequest(
Long categoryId,

@NotNull
@Schema(description = "처리자 ID",
@Schema(description = "담당자 ID",
example = "2")
Long processorId,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public record FilterTaskListRequest(
@NotNull
String title,

@Schema(description = "요청자/처리자 닉네임", example = "atom.park")
@Schema(description = "요청자/담당자 닉네임", example = "atom.park")
@NotNull
String nickName,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ public record FilterTeamStatusRequest(
SortBy sortBy,

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

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

@Schema(description = "작업 타이틀 검색", example = "타이틀1")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package clap.server.adapter.inbound.web.dto.task.request;

import clap.server.adapter.outbound.persistense.entity.task.constant.TaskStatus;
import jakarta.validation.constraints.NotNull;

public record UpdateTaskStatusRequest(
@NotNull
TaskStatus taskStatus
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import clap.server.adapter.inbound.web.dto.task.request.ApprovalTaskRequest;
import clap.server.adapter.inbound.web.dto.task.request.UpdateTaskLabelRequest;
import clap.server.adapter.inbound.web.dto.task.request.UpdateTaskProcessorRequest;
import clap.server.adapter.inbound.web.dto.task.request.UpdateTaskStatusRequest;
import clap.server.adapter.inbound.web.dto.task.response.ApprovalTaskResponse;
import clap.server.adapter.outbound.persistense.entity.log.constant.LogStatus;
import clap.server.adapter.outbound.persistense.entity.task.constant.TaskStatus;
import clap.server.application.port.inbound.task.ApprovalTaskUsecase;
import clap.server.application.port.inbound.task.UpdateTaskLabelUsecase;
import clap.server.application.port.inbound.task.UpdateTaskProcessorUsecase;
Expand Down Expand Up @@ -36,6 +36,7 @@ public class ChangeTaskController {
private final UpdateTaskProcessorUsecase updateTaskProcessorUsecase;
private final UpdateTaskLabelUsecase updateTaskLabelUsecase;
private final ApprovalTaskUsecase approvalTaskUsecase;

@LogType(LogStatus.STATUS_CHANGED)
@Operation(summary = "작업 상태 변경")
@Secured("ROLE_MANAGER")
Expand All @@ -45,13 +46,13 @@ public void updateTaskState(
@AuthenticationPrincipal SecurityUserDetails userInfo,
@Parameter(description = "변경하고 싶은 작업 상태",
schema = @Schema(allowableValues = {"IN_PROGRESS", "IN_REVIEWING", "COMPLETED"}))
@RequestBody TaskStatus taskStatus) {
@RequestBody @Valid UpdateTaskStatusRequest request) {

updateTaskStatusUsecase.updateTaskStatus(userInfo.getUserId(), taskId, taskStatus);
updateTaskStatusUsecase.updateTaskStatus(userInfo.getUserId(), taskId, request.taskStatus());
}

@LogType(LogStatus.ASSIGNER_CHANGED)
@Operation(summary = "작업 처리자 변경")
@Operation(summary = "작업 담당자 변경")
@Secured({"ROLE_MANAGER"})
@PatchMapping("/{taskId}/processor")
public void updateTaskProcessor(
Expand All @@ -70,6 +71,7 @@ public void updateTaskLabel(
@Valid @RequestBody UpdateTaskLabelRequest updateTaskLabelRequest) {
updateTaskLabelUsecase.updateTaskLabel(taskId, userInfo.getUserId(), updateTaskLabelRequest);
}

@LogType(LogStatus.REQUEST_APPROVED)
@Operation(summary = "작업 승인")
@Secured({"ROLE_MANAGER"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum LogStatus {
REQUEST_UPDATED("요청 수정"),
REQUEST_CANCELLED("요청 취소"),
REQUEST_APPROVED("요청 승인"),
ASSIGNER_CHANGED("처리자 변경"),
ASSIGNER_CHANGED("담당자 변경"),
COMMENT_ADDED("댓글 추가"),
COMMENT_UPDATED("댓글 수정"),
STATUS_CHANGED("작업 상태 변경"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public enum NotificationType {
COMMENT("댓글"),
TASK_REQUESTED("작업 요청"),
STATUS_SWITCHED("상태 전환"),
PROCESSOR_ASSIGNED("처리자 할당"),
PROCESSOR_CHANGED("처리자 변경"),
PROCESSOR_ASSIGNED("담당자 할당"),
PROCESSOR_CHANGED("담당자 변경"),
INVITATION("회원가입 초대");

private final String description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public enum TaskHistoryType {
COMMENT("댓글"),
COMMENT_FILE("댓글 첨부파일"),
STATUS_SWITCHED("상태 전환"),
PROCESSOR_ASSIGNED("처리자 할당"),
PROCESSOR_CHANGED("처리자 변경"),
PROCESSOR_ASSIGNED("담당자 할당"),
PROCESSOR_CHANGED("담당자 변경"),
TASK_TERMINATED("작업 종료됨");

private final String description;
Expand Down