Skip to content

Commit

Permalink
refactor(Convention): 코드 컨벤션 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Jul 4, 2024
1 parent 0bcae68 commit e2425a2
Show file tree
Hide file tree
Showing 169 changed files with 297 additions and 335 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class AccusationReportController {
private final ReportAccusationUseCase reportAccusationUsecase;

@Operation(summary = "[U] 신고 접수", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PostMapping("")
public ApiResponse<Long> reportIncident(
@Valid @RequestBody AccuseRequestDto requestDto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AccusationRetrievalController {
"신고 대상, 처리 상태 중 하나라도 입력하지 않으면 전체 조회됨<br>" +
"누적 횟수 기준으로 정렬할지 여부를 선택할 수 있음<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, memberId, targetReferenceId")
@Secured({"ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("")
public ApiResponse<PagedResponseDto<AccuseResponseDto>> retrieveAccusations(
@RequestParam(name = "targetType", required = false) TargetType type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class AccusationStatusController {
private final ChangeAccusationStatusUseCase changeAccusationStatusUsecase;

@Operation(summary = "[A] 신고 상태 변경", description = "ROLE_ADMIN 이상의 권한이 필요함")
@Secured({"ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("/{targetType}/{targetId}")
public ApiResponse<Long> changeAccusationStatus(
@PathVariable(name = "targetType") TargetType type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class MyAccusationsController {

@Operation(summary = "[U] 나의 신고 내역 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, memberId, targetReferenceId")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/my")
public ApiResponse<PagedResponseDto<AccuseMyResponseDto>> retrieveMyAccusations(
@RequestParam(name = "page", defaultValue = "0") int page,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
import page.clab.api.domain.accuse.application.port.out.*;
import page.clab.api.domain.accuse.application.port.out.RegisterAccusePort;
import page.clab.api.domain.accuse.application.port.out.RemoveAccusePort;
import page.clab.api.domain.accuse.application.port.out.RetrieveAccusePort;
import page.clab.api.domain.accuse.application.port.out.UpdateAccusePort;
import page.clab.api.domain.accuse.domain.Accuse;
import page.clab.api.domain.accuse.domain.AccuseTarget;
import page.clab.api.domain.accuse.domain.TargetType;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class AccuseTargetTypeIncorrectException extends RuntimeException {

public AccuseTargetTypeIncorrectException(String message) {
super(message);
super(message);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
Expand All @@ -27,17 +26,15 @@
import page.clab.api.domain.activityGroup.dto.request.ActivityGroupUpdateRequestDto;
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupMemberWithApplyReasonResponseDto;
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupResponseDto;
import page.clab.api.domain.application.domain.Application;
import page.clab.api.domain.award.dto.response.AwardResponseDto;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.common.dto.ApiResponse;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.exception.InvalidColumnException;
import page.clab.api.global.exception.PermissionDeniedException;

import java.util.List;
import page.clab.api.global.exception.SortingArgumentException;
import page.clab.api.global.util.PageableUtils;

import java.util.List;

@RestController
@RequestMapping("/api/v1/activity-group/admin")
@RequiredArgsConstructor
Expand All @@ -48,7 +45,7 @@ public class ActivityGroupAdminController {
private final ActivityGroupAdminService activityGroupAdminService;

@Operation(summary = "[U] 활동 생성", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PostMapping("")
public ApiResponse<Long> createActivityGroup(
@Valid @RequestBody ActivityGroupRequestDto requestDto
Expand All @@ -58,7 +55,7 @@ public ApiResponse<Long> createActivityGroup(
}

@Operation(summary = "[U] 활동 수정", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("/{activityGroupId}")
public ApiResponse<Long> updateActivityGroup(
@PathVariable(name = "activityGroupId") Long activityGroupId,
Expand All @@ -69,7 +66,7 @@ public ApiResponse<Long> updateActivityGroup(
}

@Operation(summary = "[A] 활동 상태 변경", description = "ROLE_ADMIN 이상의 권한이 필요함")
@Secured({"ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("manage/{activityGroupId}")
public ApiResponse<Long> manageActivityGroupStatus(
@PathVariable(name = "activityGroupId") Long activityGroupId,
Expand All @@ -80,7 +77,7 @@ public ApiResponse<Long> manageActivityGroupStatus(
}

@Operation(summary = "[A] 활동 삭제", description = "ROLE_ADMIN 이상의 권한이 필요함")
@Secured({"ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_ADMIN", "ROLE_SUPER" })
@DeleteMapping("/{activityGroupId}")
public ApiResponse<Long> deleteActivityGroup(
@PathVariable(name = "activityGroupId") Long activityGroupId
Expand All @@ -91,7 +88,7 @@ public ApiResponse<Long> deleteActivityGroup(

@Operation(summary = "[U] 프로젝트 진행도 수정", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"진행도는 0~100 사이의 값으로 입력해야 함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("/progress/{activityGroupId}")
public ApiResponse<Long> updateProjectProgress(
@PathVariable(name = "activityGroupId") Long activityGroupId,
Expand All @@ -102,7 +99,7 @@ public ApiResponse<Long> updateProjectProgress(
}

@Operation(summary = "[U] 커리큘럼 및 일정 생성", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PostMapping("/schedule")
public ApiResponse<Long> addSchedule(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -115,7 +112,7 @@ public ApiResponse<Long> addSchedule(
@Operation(summary = "[U] 활동 멤버 및 지원서 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"관리자 또는 리더만 조회 가능<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, activityGroupId, memberId")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/members")
public ApiResponse<PagedResponseDto<ActivityGroupMemberWithApplyReasonResponseDto>> getApplyGroupMemberList(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -130,7 +127,7 @@ public ApiResponse<PagedResponseDto<ActivityGroupMemberWithApplyReasonResponseDt
}

@Operation(summary = "[U] 신청 멤버 상태 변경", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("/accept")
public ApiResponse<String> acceptGroupMember(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -143,7 +140,7 @@ public ApiResponse<String> acceptGroupMember(

@GetMapping("/deleted")
@Operation(summary = "[S] 삭제된 활동그룹 조회하기", description = "ROLE_SUPER 이상의 권한이 필요함")
@Secured({"ROLE_SUPER"})
@Secured({ "ROLE_SUPER" })
public ApiResponse<PagedResponseDto<ActivityGroupResponseDto>> getDeletedActivityGroups(
@RequestParam(name = "page", defaultValue = "0") int page,
@RequestParam(name = "size", defaultValue = "20") int size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
Expand All @@ -26,17 +25,15 @@
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupBoardResponseDto;
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupBoardUpdateResponseDto;
import page.clab.api.domain.activityGroup.dto.response.AssignmentSubmissionWithFeedbackResponseDto;
import page.clab.api.domain.application.domain.Application;
import page.clab.api.domain.award.dto.response.AwardResponseDto;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.common.dto.ApiResponse;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.exception.InvalidColumnException;
import page.clab.api.global.exception.PermissionDeniedException;

import java.util.List;
import page.clab.api.global.exception.SortingArgumentException;
import page.clab.api.global.util.PageableUtils;

import java.util.List;

@RestController
@RequestMapping("/api/v1/activity-group/boards")
@RequiredArgsConstructor
Expand All @@ -53,7 +50,7 @@ public class ActivityGroupBoardController {
"제출 : 부모 게시판(과제), 첨부파일 경로 리스트<br>" +
"피드백 : 부모 게시판(제출), 카테고리, 내용 , 첨부파일 경로 리스트(선택)"
)
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PostMapping("")
public ApiResponse<Long> createActivityGroupBoard(
@RequestParam(name = "parentId", required = false) Long parentId,
Expand All @@ -66,7 +63,7 @@ public ApiResponse<Long> createActivityGroupBoard(

@Operation(summary = "[U] 활동 그룹 게시판 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, activityGroupId, dueDateTime, parentId, memberId")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/list")
public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getActivityGroupBoardList(
@RequestParam(name = "page", defaultValue = "0") int page,
Expand All @@ -80,7 +77,7 @@ public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getActivityG
}

@Operation(summary = "[U] 활동 그룹 게시판 단일 조회", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("")
public ApiResponse<ActivityGroupBoardResponseDto> getActivityGroupBoardById(
@RequestParam(name = "activityGroupBoardId") Long activityGroupBoardId
Expand All @@ -91,7 +88,7 @@ public ApiResponse<ActivityGroupBoardResponseDto> getActivityGroupBoardById(

@Operation(summary = "[U] 활동 그룹 ID에 대한 카테고리별 게시판 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, activityGroupId, dueDateTime, parentId, memberId")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/by-category")
public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getActivityGroupBoardByCategory(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -107,7 +104,7 @@ public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getActivityG
}

@Operation(summary = "[U] 활동 그룹 게시판 계층 구조적 조회, 부모 및 자식 게시판 함께 반환", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/by-parent")
public ApiResponse<PagedResponseDto<ActivityGroupBoardChildResponseDto>> getActivityGroupBoardByParent(
@RequestParam(name = "parentId") Long parentId,
Expand All @@ -120,7 +117,7 @@ public ApiResponse<PagedResponseDto<ActivityGroupBoardChildResponseDto>> getActi
}

@Operation(summary = "[U] 나의 제출 과제 및 피드백 조회", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/my-assignment")
public ApiResponse<List<AssignmentSubmissionWithFeedbackResponseDto>> getMyAssignmentBoardWithFeedback(
@RequestParam(name = "parentId") Long parentId
Expand All @@ -130,7 +127,7 @@ public ApiResponse<List<AssignmentSubmissionWithFeedbackResponseDto>> getMyAssig
}

@Operation(summary = "[U] 활동 그룹 게시판 수정", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PatchMapping("")
public ApiResponse<ActivityGroupBoardUpdateResponseDto> updateActivityGroupBoard(
@RequestParam(name = "activityGroupBoardId") Long activityGroupBoardId,
Expand All @@ -141,7 +138,7 @@ public ApiResponse<ActivityGroupBoardUpdateResponseDto> updateActivityGroupBoard
}

@Operation(summary = "[U] 활동 그룹 게시판 삭제", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@DeleteMapping("")
public ApiResponse<Long> deleteActivityGroupBoard(
@RequestParam Long activityGroupBoardId
Expand All @@ -152,7 +149,7 @@ public ApiResponse<Long> deleteActivityGroupBoard(

@GetMapping("/deleted")
@Operation(summary = "[S] 삭제된 활동 그룹 게시판 조회하기", description = "ROLE_SUPER 이상의 권한이 필요함")
@Secured({"ROLE_SUPER"})
@Secured({ "ROLE_SUPER" })
public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getDeletedActivityGroupBoards(
@RequestParam(name = "page", defaultValue = "0") int page,
@RequestParam(name = "size", defaultValue = "20") int size
Expand All @@ -162,4 +159,4 @@ public ApiResponse<PagedResponseDto<ActivityGroupBoardResponseDto>> getDeletedAc
return ApiResponse.success(activityBoards);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.List;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.PageRequest;
Expand All @@ -28,13 +26,14 @@
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupResponseDto;
import page.clab.api.domain.activityGroup.dto.response.ActivityGroupStatusResponseDto;
import page.clab.api.domain.activityGroup.dto.response.GroupMemberResponseDto;
import page.clab.api.domain.application.domain.Application;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.common.dto.ApiResponse;
import page.clab.api.global.common.dto.PagedResponseDto;
import page.clab.api.global.exception.InvalidColumnException;
import page.clab.api.global.exception.SortingArgumentException;
import page.clab.api.global.util.PageableUtils;

import java.util.List;

@RestController
@RequestMapping("/api/v1/activity-group/member")
@RequiredArgsConstructor
Expand Down Expand Up @@ -68,7 +67,7 @@ public ApiResponse<Object> getActivityGroup(
}

@Operation(summary = "[U] 나의 활동 목록 조회", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/my")
public ApiResponse<PagedResponseDto<ActivityGroupResponseDto>> getMyActivityGroups(
@RequestParam(name = "page", defaultValue = "0") int page,
Expand All @@ -80,9 +79,9 @@ public ApiResponse<PagedResponseDto<ActivityGroupResponseDto>> getMyActivityGrou
}

@Operation(summary = "[U] 활동 상태별 조회", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/status")
public ApiResponse<PagedResponseDto<ActivityGroupStatusResponseDto>> getActivityGroupsByStatus (
public ApiResponse<PagedResponseDto<ActivityGroupStatusResponseDto>> getActivityGroupsByStatus(
@RequestParam(name = "activityGroupStatus") ActivityGroupStatus status,
@RequestParam(name = "page", defaultValue = "0") int page,
@RequestParam(name = "size", defaultValue = "20") int size
Expand All @@ -109,7 +108,7 @@ public ApiResponse<PagedResponseDto<ActivityGroupResponseDto>> getActivityGroups

@Operation(summary = "[U] 활동 일정 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, endDate, startDate")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/schedule")
public ApiResponse<PagedResponseDto<GroupScheduleDto>> getGroupScheduleList(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -126,7 +125,7 @@ public ApiResponse<PagedResponseDto<GroupScheduleDto>> getGroupScheduleList(
@Operation(summary = "[U] 활동 멤버 조회", description = "ROLE_USER 이상의 권한이 필요함<br>" +
"활동에 참여(수락)된 멤버만 조회 가능<br>" +
"페이지네이션 정렬에 사용할 수 있는 칼럼 : createdAt, id, updatedAt, endDate, startDate")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@GetMapping("/members")
public ApiResponse<PagedResponseDto<GroupMemberResponseDto>> getActivityGroupMemberList(
@RequestParam(name = "activityGroupId") Long activityGroupId,
Expand All @@ -141,7 +140,7 @@ public ApiResponse<PagedResponseDto<GroupMemberResponseDto>> getActivityGroupMem
}

@Operation(summary = "[U] 활동 신청", description = "ROLE_USER 이상의 권한이 필요함")
@Secured({"ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER"})
@Secured({ "ROLE_USER", "ROLE_ADMIN", "ROLE_SUPER" })
@PostMapping("/apply")
public ApiResponse<Long> applyActivityGroup(
@RequestParam Long activityGroupId,
Expand All @@ -151,4 +150,4 @@ public ApiResponse<Long> applyActivityGroup(
return ApiResponse.success(id);
}

}
}
Loading

0 comments on commit e2425a2

Please sign in to comment.