diff --git a/app-main/build.gradle b/app-main/build.gradle
index 5adbc55d6..6d2dc5e21 100644
--- a/app-main/build.gradle
+++ b/app-main/build.gradle
@@ -20,14 +20,11 @@ spotless {
target '**/*.java'
// 네이버 자바 컨벤션 적용
- importOrder() // import 순서 정리
+ importOrder("java","javax","org","net","com","") // import 순서 정리
removeUnusedImports()
// 네이버 코딩 컨벤션 XML 파일 사용
eclipse().configFile('naver-eclipse-formatter.xml')
-
- trimTrailingWhitespace()
- endWithNewline()
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/BoardController.java b/app-main/src/main/java/net/causw/app/main/api/BoardController.java
index 87a638acc..1482d59a0 100644
--- a/app-main/src/main/java/net/causw/app/main/api/BoardController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/BoardController.java
@@ -16,8 +16,6 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.community.board.service.BoardService;
import net.causw.app.main.api.dto.board.BoardAppliesResponseDto;
import net.causw.app.main.api.dto.board.BoardApplyRequestDto;
import net.causw.app.main.api.dto.board.BoardApplyResponseDto;
@@ -28,6 +26,8 @@
import net.causw.app.main.api.dto.board.BoardResponseDto;
import net.causw.app.main.api.dto.board.BoardSubscribeResponseDto;
import net.causw.app.main.api.dto.board.BoardUpdateRequestDto;
+import net.causw.app.main.domain.community.board.service.BoardService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.InternalServerException;
import net.causw.global.exception.UnauthorizedException;
@@ -48,8 +48,7 @@ public class BoardController {
@GetMapping
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시판 검색 API(완료)"
- , description = "전체 게시판을 불러오는 api로 관리자 권한을 가진 경우 삭제된 게시판도 확인할 수 있습니다.
" +
+ @Operation(summary = "게시판 검색 API(완료)", description = "전체 게시판을 불러오는 api로 관리자 권한을 가진 경우 삭제된 게시판도 확인할 수 있습니다.
" +
"학적이 GRADUATED인 졸업생이 접근할 경우 크자회에게 제공되는 (isAlumni가 true) 게시판만 조회됩니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -60,15 +59,14 @@ public class BoardController {
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public List findAllBoard(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.boardService.findAllBoard(userDetails.getUser());
}
@GetMapping("/main")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시판 검색 API(완료)"
- , description = "전체 게시판을 불러오는 api로 관리자 권한을 가진 경우 삭제된 게시판도 확인할 수 있습니다.
"
+ @Operation(summary = "게시판 검색 API(완료)", description = "전체 게시판을 불러오는 api로 관리자 권한을 가진 경우 삭제된 게시판도 확인할 수 있습니다.
"
+ "학적이 GRADUATED인 졸업생이 접근할 경우 크자회에게 제공되는 (isAlumni가 true) 게시판만 조회됩니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -79,8 +77,8 @@ public List findAllBoard(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public List mainBoard(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.boardService.mainBoard(userDetails.getUser());
}
@@ -92,8 +90,8 @@ public List mainBoard(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public BoardNameCheckResponseDto checkBoardName(
- @RequestBody @Valid BoardNameCheckRequestDto boardNameCheckRequestDto
- ) {
+ @RequestBody @Valid
+ BoardNameCheckRequestDto boardNameCheckRequestDto) {
return this.boardService.checkBoardName(boardNameCheckRequestDto);
}
@@ -109,9 +107,10 @@ public BoardNameCheckResponseDto checkBoardName(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void applyBoard(
- @RequestBody @Valid BoardApplyRequestDto boardApplyRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestBody @Valid
+ BoardApplyRequestDto boardApplyRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.boardService.applyBoard(userDetails.getUser(), boardApplyRequestDto);
}
@@ -128,9 +127,10 @@ public void applyBoard(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public BoardResponseDto createBoard(
- @Valid @RequestBody BoardCreateRequestDto boardCreateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ BoardCreateRequestDto boardCreateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.boardService.createNoticeBoard(userDetails.getUser(), boardCreateRequestDto);
}
@@ -163,8 +163,8 @@ public List findAllBoardApply() {
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public BoardApplyResponseDto findBoardApplyById(
- @PathVariable("id") String id
- ) {
+ @PathVariable("id")
+ String id) {
return this.boardService.findBoardApplyByApplyId(id);
}
@@ -182,8 +182,8 @@ public BoardApplyResponseDto findBoardApplyById(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public BoardApplyResponseDto acceptApply(
- @PathVariable("applyId") String applyId
- ) {
+ @PathVariable("applyId")
+ String applyId) {
return this.boardService.accept(applyId);
}
@@ -202,8 +202,8 @@ public BoardApplyResponseDto acceptApply(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public BoardApplyResponseDto rejectApply(
- @PathVariable("applyId") String applyId
- ) {
+ @PathVariable("applyId")
+ String applyId) {
return this.boardService.reject(applyId);
}
@@ -224,10 +224,12 @@ public BoardApplyResponseDto rejectApply(
@ApiResponse(responseCode = "5001", description = "Board id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public BoardResponseDto updateBoard(
- @PathVariable("id") String id,
- @Valid @RequestBody BoardUpdateRequestDto boardUpdateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @Valid @RequestBody
+ BoardUpdateRequestDto boardUpdateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.boardService.updateBoard(userDetails.getUser(), id, boardUpdateRequestDto);
}
@@ -247,9 +249,10 @@ public BoardResponseDto updateBoard(
@ApiResponse(responseCode = "5000", description = "Board id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public BoardResponseDto deleteBoard(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.boardService.deleteBoard(userDetails.getUser(), id);
}
@@ -270,43 +273,43 @@ public BoardResponseDto deleteBoard(
@ApiResponse(responseCode = "5000", description = "Board id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public BoardResponseDto restoreBoard(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return this.boardService.restoreBoard(userDetails.getUser(), id);
}
@PostMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 게시판 알람 설정 켜기"
- , description = "id에는 board id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 게시판 알람 설정 켜기", description = "id에는 board id 값을 넣어주세요")
public BoardSubscribeResponseDto subscribeBoard(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return boardService.setBoardSubscribe(userDetails.getUser(), id, true);
}
@DeleteMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 게시판 알람 설정 끄기"
- , description = "id에는 board id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 게시판 알람 설정 끄기", description = "id에는 board id 값을 넣어주세요")
public BoardSubscribeResponseDto unsubscribeBoard(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return boardService.setBoardSubscribe(userDetails.getUser(), id, false);
}
@PostMapping("/subscribe")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "게시판 구독 데이터 생성 API(관리자용/임시)",
- description = "id에는 board id 값을 넣어주세요
" +
- "기존 게시판들의 구독 여부 저장을 위한 임시 api 입니다. 설정후 삭제 예정이고, 추후에는 공지게시판 생성과 동시에 구독여부도 저장될 예정입니다.")
+ @Operation(summary = "게시판 구독 데이터 생성 API(관리자용/임시)", description = "id에는 board id 값을 넣어주세요
" +
+ "기존 게시판들의 구독 여부 저장을 위한 임시 api 입니다. 설정후 삭제 예정이고, 추후에는 공지게시판 생성과 동시에 구독여부도 저장될 예정입니다.")
public void createBoardSubscribe(
- @RequestParam("id") String id
- ) {
+ @RequestParam("id")
+ String id) {
this.boardService.createBoardSubscribe(id);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/CalendarController.java b/app-main/src/main/java/net/causw/app/main/api/CalendarController.java
index b790fbd9a..3e5218776 100644
--- a/app-main/src/main/java/net/causw/app/main/api/CalendarController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/CalendarController.java
@@ -45,7 +45,8 @@ public class CalendarController {
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public CalendarsResponseDto findCalendars(@RequestParam("year") Integer year) {
+ public CalendarsResponseDto findCalendars(@RequestParam("year")
+ Integer year) {
return calendarService.findCalendarByYear(year);
}
@@ -59,7 +60,8 @@ public CalendarsResponseDto findCalendars(@RequestParam("year") Integer year) {
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public CalendarResponseDto findCalendars(@PathVariable("calendarId") String calendarId) {
+ public CalendarResponseDto findCalendars(@PathVariable("calendarId")
+ String calendarId) {
return calendarService.findCalendar(calendarId);
}
@@ -88,9 +90,10 @@ public CalendarResponseDto findHomeCalendar() {
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CalendarResponseDto createCalendar(
- @RequestPart(value = "calendarCreateRequestDto") @Valid CalendarCreateRequestDto calendarCreateRequestDto,
- @RequestPart(value = "image") MultipartFile image
- ) {
+ @RequestPart(value = "calendarCreateRequestDto") @Valid
+ CalendarCreateRequestDto calendarCreateRequestDto,
+ @RequestPart(value = "image")
+ MultipartFile image) {
return calendarService.createCalendar(calendarCreateRequestDto, image);
}
@@ -105,10 +108,12 @@ public CalendarResponseDto createCalendar(
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CalendarResponseDto updateCalendar(
- @PathVariable("calendarId") String calendarId,
- @RequestPart(value = "calendarUpdateRequestDto") @Valid CalendarUpdateRequestDto calendarUpdateRequestDto,
- @RequestPart(value = "image") MultipartFile image
- ) {
+ @PathVariable("calendarId")
+ String calendarId,
+ @RequestPart(value = "calendarUpdateRequestDto") @Valid
+ CalendarUpdateRequestDto calendarUpdateRequestDto,
+ @RequestPart(value = "image")
+ MultipartFile image) {
return calendarService.updateCalendar(calendarId, calendarUpdateRequestDto, image);
}
@@ -123,8 +128,8 @@ public CalendarResponseDto updateCalendar(
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CalendarResponseDto deleteCalendar(
- @PathVariable("calendarId") String calendarId
- ) {
+ @PathVariable("calendarId")
+ String calendarId) {
return calendarService.deleteCalendar(calendarId);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/CeremonyController.java b/app-main/src/main/java/net/causw/app/main/api/CeremonyController.java
index a683960b1..15d492ea6 100644
--- a/app-main/src/main/java/net/causw/app/main/api/CeremonyController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/CeremonyController.java
@@ -19,7 +19,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.ceremony.CeremonyNotificationSettingResponseDto;
import net.causw.app.main.api.dto.ceremony.CeremonyResponseDto;
import net.causw.app.main.api.dto.ceremony.CreateCeremonyNotificationSettingDto;
@@ -29,6 +28,7 @@
import net.causw.app.main.domain.community.ceremony.enums.CeremonyContext;
import net.causw.app.main.domain.community.ceremony.enums.CeremonyState;
import net.causw.app.main.domain.community.ceremony.service.CeremonyService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
@@ -50,51 +50,54 @@ public class CeremonyController {
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "사용자 본인의 경조사 생성",
- description = "사용자 본인의 경조사 생성합니다.")
+ @Operation(summary = "사용자 본인의 경조사 생성", description = "사용자 본인의 경조사 생성합니다.")
public CeremonyResponseDto createCeremony(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "createCeremonyRequestDTO") @Valid CreateCeremonyRequestDto createCeremonyRequestDTO,
- @RequestPart(value = "imageFileList", required = false) List imageFileList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "createCeremonyRequestDTO") @Valid
+ CreateCeremonyRequestDto createCeremonyRequestDTO,
+ @RequestPart(value = "imageFileList", required = false)
+ List imageFileList) {
return ceremonyService.createCeremony(userDetails.getUser(), createCeremonyRequestDTO, imageFileList);
}
@GetMapping
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "사용자 본인의 경조사 신청 내역 조회",
- description = "사용자 본인의 경조사 신청 내역을 조회합니다.")
+ @Operation(summary = "사용자 본인의 경조사 신청 내역 조회", description = "사용자 본인의 경조사 신청 내역을 조회합니다.")
public Page getCeremonies(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestParam(name = "ceremonyState", defaultValue = "ACCEPT") CeremonyState state,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestParam(name = "ceremonyState", defaultValue = "ACCEPT")
+ CeremonyState state,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return ceremonyService.getUserCeremonyResponses(userDetails.getUser(), state, pageNum);
}
@GetMapping("/list/await")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_LEADER_ALUMNI)")
- @Operation(summary = "전체 경조사 승인 대기 목록 조회(관리자용)",
- description = "전체 경조사 승인 대기 목록을 조회합니다.")
+ @Operation(summary = "전체 경조사 승인 대기 목록 조회(관리자용)", description = "전체 경조사 승인 대기 목록을 조회합니다.")
public Page getAllUserAwaitingCeremonyPage(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return ceremonyService.getAllUserAwaitingCeremonyPage(pageNum);
}
@GetMapping("/{ceremonyId}")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "유저 경조사 정보 상세 보기",
- description = "유저 경조사 정보를 조회합니다. 접근한 페이지에 따라 Request Param을 다르게 해주세요." +
- "general : 전체 알림 페이지에서 접근" +
- "my : 내 경조사 목록에서 접근" +
- "admin : 관리자용 경조사 관리 페이지에서 접근")
+ @Operation(summary = "유저 경조사 정보 상세 보기", description = "유저 경조사 정보를 조회합니다. 접근한 페이지에 따라 Request Param을 다르게 해주세요."
+ +
+ "general : 전체 알림 페이지에서 접근" +
+ "my : 내 경조사 목록에서 접근" +
+ "admin : 관리자용 경조사 관리 페이지에서 접근")
public CeremonyResponseDto getUserCeremonyInfo(
- @PathVariable("ceremonyId") String ceremonyId,
- @RequestParam(name = "context") String contextParam,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("ceremonyId")
+ String ceremonyId,
+ @RequestParam(name = "context")
+ String contextParam,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
CeremonyContext context = CeremonyContext.fromString(contextParam);
return ceremonyService.getCeremony(ceremonyId, context, userDetails.getUser());
}
@@ -102,33 +105,32 @@ public CeremonyResponseDto getUserCeremonyInfo(
@PutMapping("/state")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_LEADER_ALUMNI)")
- @Operation(summary = "유저 경조사 승인 상태 변경(승인/거부)(관리자용)",
- description = "유저 경조사 승인 상태를 변경합니다.")
+ @Operation(summary = "유저 경조사 승인 상태 변경(승인/거부)(관리자용)", description = "유저 경조사 승인 상태를 변경합니다.")
public CeremonyResponseDto updateUserCeremonyStatus(
- @RequestBody @Valid UpdateCeremonyStateRequestDto updateCeremonyStateRequestDto
- ) {
+ @RequestBody @Valid
+ UpdateCeremonyStateRequestDto updateCeremonyStateRequestDto) {
return ceremonyService.updateUserCeremonyStatus(updateCeremonyStateRequestDto);
}
@PutMapping("/state/close/{ceremonyId}")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "유저 경조사 신청 취소(사용자용)",
- description = "유저가 본인의 경조사 승인 상태를 close로 변경합니다.")
+ @Operation(summary = "유저 경조사 신청 취소(사용자용)", description = "유저가 본인의 경조사 승인 상태를 close로 변경합니다.")
public CeremonyResponseDto closeUserCeremonyStatus(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "ceremonyId") String ceremonyId
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "ceremonyId")
+ String ceremonyId) {
return ceremonyService.closeUserCeremonyStatus(userDetails.getUser(), ceremonyId);
}
@PostMapping("/notification-setting")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "유저 경조사 알람 설정 생성",
- description = "유저 경조사 알람 설정을 생성합니다. 학번은 2자리로 입력해주세요. (ex. 19)")
+ @Operation(summary = "유저 경조사 알람 설정 생성", description = "유저 경조사 알람 설정을 생성합니다. 학번은 2자리로 입력해주세요. (ex. 19)")
public CeremonyNotificationSettingResponseDto createCeremonyNotificationSetting(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid CreateCeremonyNotificationSettingDto ceremonyNotificationSettingDTO
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ CreateCeremonyNotificationSettingDto ceremonyNotificationSettingDTO) {
return ceremonyService.createCeremonyNotificationSettings(userDetails.getUser(),
ceremonyNotificationSettingDTO);
}
@@ -137,7 +139,8 @@ public CeremonyNotificationSettingResponseDto createCeremonyNotificationSetting(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "유저 경조사 알람 설정 조회", description = "유저의 경조사 알람 설정을 조회합니다.")
public CeremonyNotificationSettingResponseDto getCeremonyNotificationSetting(
- @AuthenticationPrincipal CustomUserDetails userDetails) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return ceremonyService.getCeremonyNotificationSetting(userDetails.getUser());
}
@@ -145,9 +148,10 @@ public CeremonyNotificationSettingResponseDto getCeremonyNotificationSetting(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "유저 경조사 알람 설정 수정", description = "유저의 경조사 알람 설정을 수정합니다. 학번은 2자리로 입력해주세요. (ex. 19)")
public CeremonyNotificationSettingResponseDto updateCeremonyNotificationSetting(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid CreateCeremonyNotificationSettingDto createCeremonyNotificationSettingDTO
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ CreateCeremonyNotificationSettingDto createCeremonyNotificationSettingDTO) {
return ceremonyService.updateUserSettings(userDetails.getUser(), createCeremonyNotificationSettingDTO);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/ChildCommentController.java b/app-main/src/main/java/net/causw/app/main/api/ChildCommentController.java
index 4e487e709..662cce4fe 100644
--- a/app-main/src/main/java/net/causw/app/main/api/ChildCommentController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/ChildCommentController.java
@@ -11,11 +11,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.community.comment.service.ChildCommentService;
import net.causw.app.main.api.dto.comment.ChildCommentCreateRequestDto;
import net.causw.app.main.api.dto.comment.ChildCommentResponseDto;
import net.causw.app.main.api.dto.comment.ChildCommentUpdateRequestDto;
+import net.causw.app.main.domain.community.comment.service.ChildCommentService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.UnauthorizedException;
@@ -59,9 +59,10 @@ public class ChildCommentController {
@ApiResponse(responseCode = "4004", description = "삭제된 동아리입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public ChildCommentResponseDto createChildComment(
- @Valid @RequestBody ChildCommentCreateRequestDto childCommentCreateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ ChildCommentCreateRequestDto childCommentCreateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.childCommentService.createChildComment(userDetails.getUser(), childCommentCreateRequestDto);
}
@@ -93,10 +94,12 @@ public ChildCommentResponseDto createChildComment(
@ApiResponse(responseCode = "5000", description = "Comment id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public ChildCommentResponseDto updateChildComment(
- @PathVariable("id") String id,
- @Valid @RequestBody ChildCommentUpdateRequestDto childCommentUpdateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @Valid @RequestBody
+ ChildCommentUpdateRequestDto childCommentUpdateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.childCommentService.updateChildComment(userDetails.getUser(), id, childCommentUpdateRequestDto);
}
@@ -127,9 +130,10 @@ public ChildCommentResponseDto updateChildComment(
@ApiResponse(responseCode = "5000", description = "Comment id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public ChildCommentResponseDto deleteChildComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.childCommentService.deleteChildComment(userDetails.getUser(), id);
}
@@ -148,16 +152,16 @@ public ChildCommentResponseDto deleteChildComment(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void likeChildComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.childCommentService.likeChildComment(userDetails.getUser(), id);
}
@DeleteMapping(value = "/{id}/like")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "대댓글 좋아요 취소 API(완료)",
- description = "특정 유저가 특정 대댓글에 좋아요를 누른 걸 취소하는 Api 입니다.")
+ @Operation(summary = "대댓글 좋아요 취소 API(완료)", description = "특정 유저가 특정 대댓글에 좋아요를 누른 걸 취소하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -170,9 +174,10 @@ public void likeChildComment(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void cancelLikeChildComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.childCommentService.cancelLikeChildComment(userDetails.getUser(), id);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/CircleController.java b/app-main/src/main/java/net/causw/app/main/api/CircleController.java
index 6be7ba818..b65dfcd14 100644
--- a/app-main/src/main/java/net/causw/app/main/api/CircleController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/CircleController.java
@@ -22,7 +22,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.circle.CircleBoardsResponseDto;
import net.causw.app.main.api.dto.circle.CircleCreateRequestDto;
import net.causw.app.main.api.dto.circle.CircleMemberResponseDto;
@@ -35,6 +34,7 @@
import net.causw.app.main.api.dto.form.response.FormResponseDto;
import net.causw.app.main.domain.campus.circle.enums.CircleMemberStatus;
import net.causw.app.main.domain.campus.circle.service.CircleService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.shared.util.ConstraintValidator;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.InternalServerException;
@@ -71,8 +71,8 @@ public class CircleController {
@ApiResponse(responseCode = "4004", description = "삭제된 {동아리명} 입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CircleResponseDto findById(
- @PathVariable(name = "circleId") String circleId
- ) {
+ @PathVariable(name = "circleId")
+ String circleId) {
return this.circleService.findById(circleId);
}
@@ -93,8 +93,8 @@ public CircleResponseDto findById(
@ApiResponse(responseCode = "4109", description = "가입이 거절된 사용자 입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public List findAll(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.findAll(userDetails.getUser());
}
@@ -118,9 +118,10 @@ public List findAll(
@ApiResponse(responseCode = "4108", description = "로그인된 사용자가 가입 신청한 소모임이 아닙니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public CircleBoardsResponseDto findBoards(
- @PathVariable(name = "circleId") String circleId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "circleId")
+ String circleId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.findBoards(userDetails.getUser(), circleId);
}
@@ -138,8 +139,8 @@ public CircleBoardsResponseDto findBoards(
@ApiResponse(responseCode = "4000", description = "소모임을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public Long getNumMember(
- @PathVariable(name = "circleId") String circleId
- ) {
+ @PathVariable(name = "circleId")
+ String circleId) {
return this.circleService.getNumMember(circleId);
}
@@ -167,16 +168,17 @@ public Long getNumMember(
@ApiResponse(responseCode = "4000", description = "소모임원을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public List getUserList(
- @PathVariable("circleId") String circleId,
- @RequestParam("circleMemberStatus") @NotNull(message = "동아리원 상태는 null이 아니어야 합니다.") CircleMemberStatus circleMemberStatus,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("circleId")
+ String circleId,
+ @RequestParam("circleMemberStatus") @NotNull(message = "동아리원 상태는 null이 아니어야 합니다.")
+ CircleMemberStatus circleMemberStatus,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.getUserList(
userDetails.getUser(),
circleId,
- circleMemberStatus
- );
+ circleMemberStatus);
}
@GetMapping(value = "/{circleId}/memberList")
@@ -196,11 +198,10 @@ public List getUserList(
@ApiResponse(responseCode = "4000", description = "소모임원을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public List findCircleMemberList(
- @PathVariable("circleId") String circleId
- ) {
+ @PathVariable("circleId")
+ String circleId) {
return this.circleService.getMemberList(
- circleId
- );
+ circleId);
}
/**
@@ -211,10 +212,7 @@ public List findCircleMemberList(
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(
- summary = "동아리 생성 API / create (완료)",
- description = "생성하고자 하는 동아리의 정보를 입력해주세요. 동아리장의 권한은 일반 유저만 가능하며, 생성 요청은 관리자(admin), 학생회장(president)만 가능합니다."
- )
+ @Operation(summary = "동아리 생성 API / create (완료)", description = "생성하고자 하는 동아리의 정보를 입력해주세요. 동아리장의 권한은 일반 유저만 가능하며, 생성 요청은 관리자(admin), 학생회장(president)만 가능합니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = void.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -232,8 +230,10 @@ public List findCircleMemberList(
@ApiResponse(responseCode = "5000", description = "Circle id immediately can be used, but exception occured", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void create(
- @RequestPart(value = "circleCreateRequestDto") @Valid CircleCreateRequestDto circleCreateRequestDto,
- @RequestPart(value = "mainImage", required = false) MultipartFile mainImage
+ @RequestPart(value = "circleCreateRequestDto") @Valid
+ CircleCreateRequestDto circleCreateRequestDto,
+ @RequestPart(value = "mainImage", required = false)
+ MultipartFile mainImage
) {
circleService.create(circleCreateRequestDto, mainImage);
@@ -248,12 +248,10 @@ public void create(
@PutMapping(value = "/{circleId}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(
- summary = "동아리 수정 API / update (완료)",
- description = "circleId 에는 수정하고자 하는 동아리의 UUID 형식의 ID String 값을 입력해주세요.\n" +
- "circleUpdateRequestDto 에는 수정하고자 하는 동아리의 정보를 입력해주세요.\n" +
- "동아리장의 권한은 일반 유저만 가능하며, 생성 요청은 관리자(admin), 학생회장(president)만 가능합니다."
- )
+ @Operation(summary = "동아리 수정 API / update (완료)", description = "circleId 에는 수정하고자 하는 동아리의 UUID 형식의 ID String 값을 입력해주세요.\n"
+ +
+ "circleUpdateRequestDto 에는 수정하고자 하는 동아리의 정보를 입력해주세요.\n" +
+ "동아리장의 권한은 일반 유저만 가능하며, 생성 요청은 관리자(admin), 학생회장(president)만 가능합니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = CircleResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "수정할 소모임을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -271,10 +269,14 @@ public void create(
@ApiResponse(responseCode = "5000", description = "Circle id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public CircleResponseDto update(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "circleId") String circleId,
- @RequestPart(value = "circleUpdateRequestDto") @Valid CircleUpdateRequestDto circleUpdateRequestDto,
- @RequestPart(value = "mainImage", required = false) MultipartFile mainImage
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "circleId")
+ String circleId,
+ @RequestPart(value = "circleUpdateRequestDto") @Valid
+ CircleUpdateRequestDto circleUpdateRequestDto,
+ @RequestPart(value = "mainImage", required = false)
+ MultipartFile mainImage
) {
return this.circleService.update(userDetails.getUser(), circleId, circleUpdateRequestDto, mainImage);
@@ -288,12 +290,9 @@ public CircleResponseDto update(
@DeleteMapping(value = "/{circleId}")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(
- summary = "동아리 삭제 API",
- description = "동아리 삭제 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "삭제 시 동아리 데이터가 아예 삭제되는 것이 아닌 isDeleted 가 true 로 바뀝니다."
- )
+ @Operation(summary = "동아리 삭제 API", description = "동아리 삭제 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "삭제 시 동아리 데이터가 아예 삭제되는 것이 아닌 isDeleted 가 true 로 바뀝니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = CircleMemberResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "삭제할 소모임을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -311,19 +310,17 @@ public CircleResponseDto update(
@ApiResponse(responseCode = "5000", description = "Circle id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public CircleResponseDto delete(
- @PathVariable(name = "circleId") String circleId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "circleId")
+ String circleId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.delete(userDetails.getUser(), circleId);
}
@PostMapping(value = "/{circleId}/applications")
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(
- summary = "사용자 동아리 지원 API",
- description = "사용자가 동아리에 지원하는 API 입니다.\n" +
- "현재 로그인한 사용자 기준으로 동아리 ID와 해당 동아리 신청서(Form)의 답변을 입력하면 해당 동아리에 지원됩니다."
- )
+ @Operation(summary = "사용자 동아리 지원 API", description = "사용자가 동아리에 지원하는 API 입니다.\n" +
+ "현재 로그인한 사용자 기준으로 동아리 ID와 해당 동아리 신청서(Form)의 답변을 입력하면 해당 동아리에 지원됩니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = void.class))),
@ApiResponse(responseCode = "4000", description = "신청할 소모임을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -343,10 +340,12 @@ public CircleResponseDto delete(
@ApiResponse(responseCode = "5000", description = "Application id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void userApply(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "circleId") String circleId,
- @RequestBody @Valid FormReplyRequestDto formReplyRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "circleId")
+ String circleId,
+ @RequestBody @Valid
+ FormReplyRequestDto formReplyRequestDto) {
circleService.userApply(userDetails.getUser(), circleId, formReplyRequestDto);
}
@@ -357,16 +356,11 @@ public void userApply(
*/
@GetMapping(value = "/{circleName}/is-duplicated")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "동아리 이름 중복 검사 API",
- description = "동아리 이름 중복 검사 API 입니다. 이름 기준으로 검사하면 String 형식으로 동아리 이름을 넣어주세요.")
- @ApiResponse(
- responseCode = "200",
- description = "OK",
- content = @Content(mediaType = "application/json", schema = @Schema(implementation = DuplicatedCheckResponseDto.class))
- )
+ @Operation(summary = "동아리 이름 중복 검사 API", description = "동아리 이름 중복 검사 API 입니다. 이름 기준으로 검사하면 String 형식으로 동아리 이름을 넣어주세요.")
+ @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = DuplicatedCheckResponseDto.class)))
public DuplicatedCheckResponseDto isDuplicatedName(
- @PathVariable(name = "circleName") @NotBlank(message = "동아리명은 공백이 아니어야 합니다.") String circleName
- ) {
+ @PathVariable(name = "circleName") @NotBlank(message = "동아리명은 공백이 아니어야 합니다.")
+ String circleName) {
return this.circleService.isDuplicatedName(circleName);
}
@@ -377,11 +371,8 @@ public DuplicatedCheckResponseDto isDuplicatedName(
*/
@PutMapping(value = "/{circleId}/users/leave")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(
- summary = "동아리 탈퇴 API",
- description = "현재 로그인 된 유저 기준으로 동아리에서 탈퇴합니다.\n" +
- "탈퇴 시 해당 유저의 동아리 가입 정보가 LEAVE 상태로 변경됩니다."
- )
+ @Operation(summary = "동아리 탈퇴 API", description = "현재 로그인 된 유저 기준으로 동아리에서 탈퇴합니다.\n" +
+ "탈퇴 시 해당 유저의 동아리 가입 정보가 LEAVE 상태로 변경됩니다.")
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = CircleMemberResponseDto.class)))
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없거나 탈퇴할 소모임을 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
@ApiResponse(responseCode = "4001", description = "이미 소모임에 가입한 사용자입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
@@ -390,9 +381,10 @@ public DuplicatedCheckResponseDto isDuplicatedName(
@ApiResponse(responseCode = "4102", description = "추방된 사용자이거나 다른 권한 관련 오류가 발생했습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
@ApiResponse(responseCode = "5000", description = "동아리에 대한 특정 예외가 발생했습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
public CircleMemberResponseDto leaveUser(
- @PathVariable(name = "circleId") String circleId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "circleId")
+ String circleId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.leaveUser(userDetails.getUser(), circleId);
}
@@ -405,8 +397,7 @@ public CircleMemberResponseDto leaveUser(
@PutMapping(value = "/{circleId}/users/{userId}/drop")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(summary = "동아리원 제거 API",
- description = "동아리원을 제거하는 API 입니다. userId 에는 제거하려는 유저를, circleId 에는 타깃 동아리를 넣어주세요.")
+ @Operation(summary = "동아리원 제거 API", description = "동아리원을 제거하는 API 입니다. userId 에는 제거하려는 유저를, circleId 에는 타깃 동아리를 넣어주세요.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CircleMemberResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없거나 추방할 사용자를 찾을 수 없거나 소모임을 찾을 수 없거나 추방시킬 사용자가 가입 신청한 소모임이 아닙니다.", content = @Content(schema = @Schema(implementation = BadRequestException.class))),
@@ -424,15 +415,16 @@ public CircleMemberResponseDto leaveUser(
@ApiResponse(responseCode = "5000", description = "Application id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public CircleMemberResponseDto dropUser(
- @PathVariable(name = "userId") String userId,
- @PathVariable(name = "circleId") String circleId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "userId")
+ String userId,
+ @PathVariable(name = "circleId")
+ String circleId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.dropUser(
userDetails.getUser(),
userId,
- circleId
- );
+ circleId);
}
/**
@@ -443,10 +435,9 @@ public CircleMemberResponseDto dropUser(
@PutMapping(value = "/applications/{applicationId}/accept")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(summary = "동아리 가입 신청 수락 API",
- description = "동아리 가입 신청에 대해 수락하는 API 입니다.\n" +
- "동아리 가입 신청 건수 고유의 ID 값(PK)을 입력해주세요.\n" +
- "수락 시 동아리원 데이터의 상태(status)가 AWAIT 에서 MEMBER 로 변경됩니다.")
+ @Operation(summary = "동아리 가입 신청 수락 API", description = "동아리 가입 신청에 대해 수락하는 API 입니다.\n" +
+ "동아리 가입 신청 건수 고유의 ID 값(PK)을 입력해주세요.\n" +
+ "수락 시 동아리원 데이터의 상태(status)가 AWAIT 에서 MEMBER 로 변경됩니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CircleMemberResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없거나 소모임 가입 신청을 찾을 수 없거나 가입 요청한 사용자를 찾을 수 없습니다.", content = @Content(schema = @Schema(implementation = BadRequestException.class))),
@@ -460,9 +451,10 @@ public CircleMemberResponseDto dropUser(
@ApiResponse(responseCode = "5000", description = "This circle has not circle leader or Application id checked, but exception occurred", content = @Content(schema = @Schema(implementation = InternalServerException.class)))
})
public CircleMemberResponseDto acceptUser(
- @PathVariable(name = "applicationId") String applicationId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "applicationId")
+ String applicationId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.acceptUser(userDetails.getUser(), applicationId);
}
@@ -474,10 +466,9 @@ public CircleMemberResponseDto acceptUser(
@PutMapping(value = "/applications/{applicationId}/reject")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(summary = "동아리 가입 신청 거절 API",
- description = "동아리 가입 신청에 대해 거절하는 API 입니다.\n" +
- "동아리 가입 신청 건수 고유의 ID 값(PK)을 입력해주세요.\n" +
- "거절 시 동아리원으로의 데이터가 삭제되는 것이 아니라 상태(status)가 REJECT 로 변경됩니다.")
+ @Operation(summary = "동아리 가입 신청 거절 API", description = "동아리 가입 신청에 대해 거절하는 API 입니다.\n" +
+ "동아리 가입 신청 건수 고유의 ID 값(PK)을 입력해주세요.\n" +
+ "거절 시 동아리원으로의 데이터가 삭제되는 것이 아니라 상태(status)가 REJECT 로 변경됩니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CircleMemberResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없거나 소모임 가입 신청을 찾을 수 없거나 가입 요청한 사용자를 찾을 수 없습니다.", content = @Content(schema = @Schema(implementation = BadRequestException.class))),
@@ -491,9 +482,10 @@ public CircleMemberResponseDto acceptUser(
@ApiResponse(responseCode = "5000", description = "This circle has not circle leader or Application id checked, but exception occurred", content = @Content(schema = @Schema(implementation = InternalServerException.class)))
})
public CircleMemberResponseDto rejectUser(
- @PathVariable(name = "applicationId") String applicationId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "applicationId")
+ String applicationId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.rejectUser(userDetails.getUser(), applicationId);
}
@@ -506,10 +498,9 @@ public CircleMemberResponseDto rejectUser(
@PutMapping(value = "/{circleId}/users/{userId}/restore")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(summary = "추방된 동아리원 복구 API",
- description = "추방된 동아리원을 복구 시키는 API 입니다. 복구 시 동아리원으로 바꿔줍니다.\n" +
- "해당하는 동아리 고유의 ID 값(PK)과 복구하려는 유저 고유의 ID 값(PK)를 입력해주세요.\n" +
- "복구 시 동아리원으로 상태(status)가 ACTIVE 로 변경됩니다.")
+ @Operation(summary = "추방된 동아리원 복구 API", description = "추방된 동아리원을 복구 시키는 API 입니다. 복구 시 동아리원으로 바꿔줍니다.\n" +
+ "해당하는 동아리 고유의 ID 값(PK)과 복구하려는 유저 고유의 ID 값(PK)를 입력해주세요.\n" +
+ "복구 시 동아리원으로 상태(status)가 ACTIVE 로 변경됩니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CircleMemberResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없거나 소모임 가입 신청을 찾을 수 없거나 가입 요청한 사용자를 찾을 수 없습니다.", content = @Content(schema = @Schema(implementation = BadRequestException.class))),
@@ -525,90 +516,80 @@ public CircleMemberResponseDto rejectUser(
@ApiResponse(responseCode = "5000", description = "This circle has not circle leader or Application id checked, but exception occurred", content = @Content(schema = @Schema(implementation = InternalServerException.class)))
})
public CircleMemberResponseDto restoreUser(
- @PathVariable(name = "circleId") String circleId,
- @PathVariable(name = "userId") String userId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "circleId")
+ String circleId,
+ @PathVariable(name = "userId")
+ String userId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.circleService.restoreUser(userDetails.getUser(), circleId, userId);
}
@GetMapping(value = "/{circleId}/users/excel")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(
- summary = "동아리원 엑셀 다운로드 API",
- description = "동아리원 정보를 엑셀로 다운로드 하는 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "엑셀 다운로드 시 해당 동아리의 동아리원 정보가 엑셀로 다운로드 됩니다."
- )
+ @Operation(summary = "동아리원 엑셀 다운로드 API", description = "동아리원 정보를 엑셀로 다운로드 하는 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "엑셀 다운로드 시 해당 동아리의 동아리원 정보가 엑셀로 다운로드 됩니다.")
public void exportExcel(
- @PathVariable(name = "circleId") String circleId,
- HttpServletResponse response
- ) {
+ @PathVariable(name = "circleId")
+ String circleId,
+ HttpServletResponse response) {
circleService.exportCircleMembersToExcel(circleId, response);
}
@PostMapping(value = "/{circleId}/apply/application")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRole(@Role.LEADER_CIRCLE)")
- @Operation(
- summary = "동아리 가입 신청서 생성/수정 API",
- description = "동아리 가입 신청서를 수정하는 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "동아리 가입 신청서를 수정하면 해당 동아리에 가입 신청서가 생성/수정됩니다. (기존에 있던 신청서 모두 비활성화)"
- )
+ @Operation(summary = "동아리 가입 신청서 생성/수정 API", description = "동아리 가입 신청서를 수정하는 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "동아리 가입 신청서를 수정하면 해당 동아리에 가입 신청서가 생성/수정됩니다. (기존에 있던 신청서 모두 비활성화)")
public void createApplicationForm(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "circleId") String circleId,
- @RequestBody @Valid FormCreateRequestDto formCreateRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "circleId")
+ String circleId,
+ @RequestBody @Valid
+ FormCreateRequestDto formCreateRequestDto) {
circleService.createApplicationForm(userDetails.getUser(), circleId, formCreateRequestDto);
}
@GetMapping(value = "/{circleId}/apply/application/is-exist")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(
- summary = "동아리 가입 신청서 존재 여부 확인 API",
- description = "현재 모집 중인 동아리 가입 신청서가 존재하는지 확인하는 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "동아리 가입 신청서가 존재하면 true, 존재하지 않으면 false 를 반환합니다."
- )
+ @Operation(summary = "동아리 가입 신청서 존재 여부 확인 API", description = "현재 모집 중인 동아리 가입 신청서가 존재하는지 확인하는 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "동아리 가입 신청서가 존재하면 true, 존재하지 않으면 false 를 반환합니다.")
public Boolean isCircleApplicationFormExist(
- @PathVariable(name = "circleId") String circleId
- ) {
+ @PathVariable(name = "circleId")
+ String circleId) {
return circleService.isCircleApplicationFormExist(circleId);
}
@GetMapping(value = "/{circleId}/apply/application")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(
- summary = "동아리 가입 신청서 조회 API",
- description = "동아리 가입 신청서를 조회하는 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "동아리 가입 신청서를 조회하면 해당 동아리에 가입 신청서가 반환됩니다."
- )
+ @Operation(summary = "동아리 가입 신청서 조회 API", description = "동아리 가입 신청서를 조회하는 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "동아리 가입 신청서를 조회하면 해당 동아리에 가입 신청서가 반환됩니다.")
public FormResponseDto getCircleApplicationForm(
- @PathVariable(name = "circleId") String circleId
- ) {
+ @PathVariable(name = "circleId")
+ String circleId) {
return circleService.getCircleApplicationForm(circleId);
}
@GetMapping(value = "/{circleId}/apply/application/all")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(
- summary = "모든 동아리 가입 신청서 페이징 조회 API",
- description = "모든 동아리 가입 신청서를 조회하는 API 입니다.\n" +
- "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
- "모든 동아리 가입 신청서를 조회하면 해당 동아리에 마감되었거나 삭제된 가입 신청서를 포함해 모든 가입 신청서가가 반환됩니다. (동아리장 및 관리자/학생회장 포함)"
- )
+ @Operation(summary = "모든 동아리 가입 신청서 페이징 조회 API", description = "모든 동아리 가입 신청서를 조회하는 API 입니다.\n" +
+ "동아리 고유 ID 값(PK)을 입력해주세요.\n" +
+ "모든 동아리 가입 신청서를 조회하면 해당 동아리에 마감되었거나 삭제된 가입 신청서를 포함해 모든 가입 신청서가가 반환됩니다. (동아리장 및 관리자/학생회장 포함)")
public Page getAllCircleApplicationFormList(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "circleId") String circleId,
- @ParameterObject Pageable pageable
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "circleId")
+ String circleId,
+ @ParameterObject
+ Pageable pageable) {
return circleService.getAllCircleApplicationFormList(userDetails.getUser(), circleId, pageable);
}
}
-
diff --git a/app-main/src/main/java/net/causw/app/main/api/CommentController.java b/app-main/src/main/java/net/causw/app/main/api/CommentController.java
index 904869278..cffe3df07 100644
--- a/app-main/src/main/java/net/causw/app/main/api/CommentController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/CommentController.java
@@ -14,12 +14,12 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.community.comment.service.CommentService;
import net.causw.app.main.api.dto.comment.CommentCreateRequestDto;
import net.causw.app.main.api.dto.comment.CommentResponseDto;
import net.causw.app.main.api.dto.comment.CommentSubscribeResponseDto;
import net.causw.app.main.api.dto.comment.CommentUpdateRequestDto;
+import net.causw.app.main.domain.community.comment.service.CommentService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.UnauthorizedException;
@@ -60,10 +60,12 @@ public class CommentController {
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public Page findAllComments(
- @RequestParam("postId") String postId,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam("postId")
+ String postId,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.commentService.findAllComments(userDetails.getUser(), postId, pageNum);
}
@@ -91,9 +93,10 @@ public Page findAllComments(
@ApiResponse(responseCode = "4004", description = "삭제된 동아리입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CommentResponseDto createComment(
- @Valid @RequestBody CommentCreateRequestDto commentCreateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ CommentCreateRequestDto commentCreateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.commentService.createComment(userDetails.getUser(), commentCreateRequestDto);
}
@@ -123,15 +126,16 @@ public CommentResponseDto createComment(
@ApiResponse(responseCode = "5000", description = "Comment id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CommentResponseDto updateComment(
- @PathVariable("id") String id,
- @Valid @RequestBody CommentUpdateRequestDto commentUpdateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @Valid @RequestBody
+ CommentUpdateRequestDto commentUpdateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.commentService.updateComment(
userDetails.getUser(),
id,
- commentUpdateRequestDto
- );
+ commentUpdateRequestDto);
}
@DeleteMapping(value = "/{id}")
@@ -161,9 +165,10 @@ public CommentResponseDto updateComment(
@ApiResponse(responseCode = "5000", description = "Comment id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public CommentResponseDto deleteComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.commentService.deleteComment(userDetails.getUser(), id);
}
@@ -182,38 +187,38 @@ public CommentResponseDto deleteComment(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void likeComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.commentService.likeComment(userDetails.getUser(), id);
}
@PostMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 댓글 알람 설정 켜기"
- , description = "id에는 comment id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 댓글 알람 설정 켜기", description = "id에는 comment id 값을 넣어주세요")
public CommentSubscribeResponseDto subscribeComment(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return commentService.setCommentSubscribe(userDetails.getUser(), id, true);
}
@DeleteMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 댓글 알람 설정 끄기"
- , description = "id에는 comment id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 댓글 알람 설정 끄기", description = "id에는 comment id 값을 넣어주세요")
public CommentSubscribeResponseDto unsubscribeComment(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return commentService.setCommentSubscribe(userDetails.getUser(), id, false);
}
@DeleteMapping(value = "/{id}/like")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "댓글 좋아요 취소 API(완료)",
- description = "특정 유저가 특정 댓글에 좋아요를 누른 걸 취소하는 Api 입니다.")
+ @Operation(summary = "댓글 좋아요 취소 API(완료)", description = "특정 유저가 특정 댓글에 좋아요를 누른 걸 취소하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -226,9 +231,10 @@ public CommentSubscribeResponseDto unsubscribeComment(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void cancelLikeComment(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.commentService.cancelLikeComment(userDetails.getUser(), id);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/CommonController.java b/app-main/src/main/java/net/causw/app/main/api/CommonController.java
index 248b83534..06330e6ee 100644
--- a/app-main/src/main/java/net/causw/app/main/api/CommonController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/CommonController.java
@@ -15,10 +15,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.homepage.HomePageResponseDto;
-import net.causw.app.main.domain.etc.textfield.service.CommonService;
import net.causw.app.main.domain.community.homepage.service.HomePageService;
+import net.causw.app.main.domain.etc.textfield.service.CommonService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
@@ -33,12 +33,11 @@ public class CommonController {
@GetMapping("/api/v1/home")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("!@security.isGraduatedUser()")
- @Operation(summary = "홈페이지 불러오기 API(완료)",
- description = "동아리에 속하지 않고 삭제되지 않은 게시판과 해당 게시판의 최신 글 3개의 정보를 반환합니다.\n" +
- "개발 db상에는 동아리에 속하지 않은 많은 더미 데이터가 있지만 실제 운영될 때는 동아리에 속하지 않는 게시판은 학생회 공지게시판 뿐입니다.\n" +
- "졸업생은 해당 api에 접근이 불가합니다."
- )
- public List getHomePage(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ @Operation(summary = "홈페이지 불러오기 API(완료)", description = "동아리에 속하지 않고 삭제되지 않은 게시판과 해당 게시판의 최신 글 3개의 정보를 반환합니다.\n" +
+ "개발 db상에는 동아리에 속하지 않은 많은 더미 데이터가 있지만 실제 운영될 때는 동아리에 속하지 않는 게시판은 학생회 공지게시판 뿐입니다.\n" +
+ "졸업생은 해당 api에 접근이 불가합니다.")
+ public List getHomePage(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.homePageService.getHomePage(userDetails.getUser());
}
@@ -46,10 +45,11 @@ public List getHomePage(@AuthenticationPrincipal CustomUser
@GetMapping("/api/v1/home/alumni")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.isGraduatedUser()")
- @Operation(summary = "크자회 전용 홈페이지 불러오기 API(완료)",
- description = "크자회 전용 홈페이지에 보여질 크자회 공지 게시판, 소통 게시판을 반환하기 위한 api 입니다.\n" +
- "db상에 isAlumni, isHome 값이 모두 true 인 경우를 반환합니다.")
- public List getAlumniHomePage(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ @Operation(summary = "크자회 전용 홈페이지 불러오기 API(완료)", description = "크자회 전용 홈페이지에 보여질 크자회 공지 게시판, 소통 게시판을 반환하기 위한 api 입니다.\n"
+ +
+ "db상에 isAlumni, isHome 값이 모두 true 인 경우를 반환합니다.")
+ public List getAlumniHomePage(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.homePageService.getAlumniHomePage(userDetails.getUser());
}
@@ -69,26 +69,26 @@ public Map healthCheck() {
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRole(@Role.ADMIN)")
public Boolean createFlag(
- @RequestParam("key") String key,
- @RequestParam("value") Boolean value
- ) {
+ @RequestParam("key")
+ String key,
+ @RequestParam("value")
+ Boolean value) {
return commonService.createFlag(
key,
- value
- );
+ value);
}
@PutMapping("/api/v1/flag")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRole(@Role.ADMIN)")
public Boolean updateFlag(
- @RequestParam("key") String key,
- @RequestParam("value") Boolean value
- ) {
+ @RequestParam("key")
+ String key,
+ @RequestParam("value")
+ Boolean value) {
return this.commonService.updateFlag(
key,
- value
- );
+ value);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/EventController.java b/app-main/src/main/java/net/causw/app/main/api/EventController.java
index 4f6d9e3ae..c48ff68e5 100644
--- a/app-main/src/main/java/net/causw/app/main/api/EventController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/EventController.java
@@ -56,9 +56,10 @@ public EventsResponseDto findEvents() {
})
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_LEADER_ALUMNI)")
public EventResponseDto createEvent(
- @RequestPart(value = "eventCreateRequestDto") @Valid EventCreateRequestDto eventCreateRequestDto,
- @RequestPart(value = "eventImage") MultipartFile eventImage
- ) {
+ @RequestPart(value = "eventCreateRequestDto") @Valid
+ EventCreateRequestDto eventCreateRequestDto,
+ @RequestPart(value = "eventImage")
+ MultipartFile eventImage) {
return eventService.createEvent(eventCreateRequestDto, eventImage);
}
@@ -73,10 +74,12 @@ public EventResponseDto createEvent(
})
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_LEADER_ALUMNI)")
public EventResponseDto updateEvent(
- @PathVariable("eventId") String eventId,
- @RequestPart(value = "eventUpdateRequestDto") @Valid EventUpdateRequestDto eventUpdateRequestDto,
- @RequestPart(value = "eventImage", required = false) MultipartFile eventImage
- ) {
+ @PathVariable("eventId")
+ String eventId,
+ @RequestPart(value = "eventUpdateRequestDto") @Valid
+ EventUpdateRequestDto eventUpdateRequestDto,
+ @RequestPart(value = "eventImage", required = false)
+ MultipartFile eventImage) {
return eventService.updateEvent(eventId, eventUpdateRequestDto, eventImage);
}
@@ -90,7 +93,8 @@ public EventResponseDto updateEvent(
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_LEADER_ALUMNI)")
- public EventResponseDto deleteEvent(@PathVariable("eventId") String eventId) {
+ public EventResponseDto deleteEvent(@PathVariable("eventId")
+ String eventId) {
return eventService.deleteEvent(eventId);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/FormController.java b/app-main/src/main/java/net/causw/app/main/api/FormController.java
index a31fe5990..c48d8a5af 100644
--- a/app-main/src/main/java/net/causw/app/main/api/FormController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/FormController.java
@@ -17,13 +17,13 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.community.form.service.FormService;
import net.causw.app.main.api.dto.form.request.FormReplyRequestDto;
import net.causw.app.main.api.dto.form.response.FormResponseDto;
import net.causw.app.main.api.dto.form.response.QuestionSummaryResponseDto;
import net.causw.app.main.api.dto.form.response.reply.ReplyPageResponseDto;
import net.causw.app.main.api.dto.form.response.reply.UserReplyResponseDto;
+import net.causw.app.main.domain.community.form.service.FormService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletResponse;
@@ -42,10 +42,12 @@ public class FormController {
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 마감 여부 설정", description = "신청서의 마감 여부를 설정합니다.")
public void setFormIsClosed(
- @PathVariable(name = "formId") String formId,
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestHeader @NotNull Boolean targetIsClosed
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestHeader @NotNull
+ Boolean targetIsClosed) {
formService.setFormIsClosed(formId, userDetails.getUser(), targetIsClosed);
}
@@ -53,9 +55,10 @@ public void setFormIsClosed(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 응답 가능 여부 조회", description = "신청서 응답이 가능한지 여부를 조회합니다.")
public Boolean getCanReplyToPostForm(
- @PathVariable(name = "formId") String formId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return formService.getCanReplyToPostForm(userDetails.getUser(), formId);
}
@@ -63,9 +66,10 @@ public Boolean getCanReplyToPostForm(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 조회", description = "신청서를 조회합니다.")
public FormResponseDto getForm(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable(name = "formId") String formId
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable(name = "formId")
+ String formId) {
return formService.getFormById(userDetails.getUser(), formId);
}
@@ -73,10 +77,12 @@ public FormResponseDto getForm(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 응답 작성", description = "신청서 응답을 작성합니다.")
public void replyForm(
- @PathVariable(name = "formId") String formId,
- @Valid @RequestBody FormReplyRequestDto formReplyRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @Valid @RequestBody
+ FormReplyRequestDto formReplyRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
formService.replyForm(formId, formReplyRequestDto, userDetails.getUser());
}
@@ -84,10 +90,12 @@ public void replyForm(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 결과 전체 페이징 조회", description = "신청서 결과 전체를 페이징으로 조회합니다. 게시글의 신청서는 게시글 작성자만, 동아리 신청서는 동아리장만 조회가 가능합니다.")
public ReplyPageResponseDto findAllReplyPageByForm(
- @PathVariable(name = "formId") String formId,
- @ParameterObject Pageable pageable,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @ParameterObject
+ Pageable pageable,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return formService.findAllReplyPageByForm(formId, pageable, userDetails.getUser());
}
@@ -95,9 +103,10 @@ public ReplyPageResponseDto findAllReplyPageByForm(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 결과 요약 조회", description = "신청서 결과를 요약 조회합니다.")
public List findSummaryReply(
- @PathVariable(name = "formId") String formId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return formService.findSummaryReply(formId, userDetails.getUser());
}
@@ -106,9 +115,10 @@ public List findSummaryReply(
@Operation(summary = "동아리 신청서 답변 유저별 조회", description = "각 유저의 동아리 신청서에 대한 답변을 조회합니다.")
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
public List findReplyByUserAndCircle(
- @PathVariable(name = "userId") String userId,
- @PathVariable(name = "circleId") String circleId
- ) {
+ @PathVariable(name = "userId")
+ String userId,
+ @PathVariable(name = "circleId")
+ String circleId) {
return formService.getReplyByUserAndCircle(userId, circleId);
}
@@ -116,10 +126,11 @@ public List findReplyByUserAndCircle(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "신청서 결과 엑셀 다운로드", description = "신청서 결과를 엑셀로 다운로드합니다.")
public void exportFormResult(
- @PathVariable(name = "formId") String formId,
- @AuthenticationPrincipal CustomUserDetails userDetails,
- HttpServletResponse response
- ) {
+ @PathVariable(name = "formId")
+ String formId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ HttpServletResponse response) {
formService.exportFormResult(formId, userDetails.getUser(), response);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/LockerController.java b/app-main/src/main/java/net/causw/app/main/api/LockerController.java
index cdb982bfa..12d2bc6f3 100644
--- a/app-main/src/main/java/net/causw/app/main/api/LockerController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/LockerController.java
@@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.locker.LockerCreateRequestDto;
import net.causw.app.main.api.dto.locker.LockerExpiredAtRequestDto;
import net.causw.app.main.api.dto.locker.LockerExtendPeriodRequestDto;
@@ -30,6 +29,7 @@
import net.causw.app.main.api.dto.locker.LockerUpdateRequestDto;
import net.causw.app.main.api.dto.locker.LockersResponseDto;
import net.causw.app.main.domain.asset.locker.service.LockerService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
@@ -45,9 +45,10 @@ public class LockerController {
@Operation(summary = "사물함 조회 Api", description = "사물함 id를 바탕으로 사물함 정보를 가져오는 Api 입니다.")
@ResponseStatus(value = HttpStatus.OK)
public LockerResponseDto findById(
- @PathVariable("lockerId") String lockerId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("lockerId")
+ String lockerId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.findById(lockerId, userDetails.getUser());
}
@@ -56,9 +57,10 @@ public LockerResponseDto findById(
@ResponseStatus(value = HttpStatus.CREATED)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public LockerResponseDto create(
- @Valid @RequestBody LockerCreateRequestDto lockerCreateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ LockerCreateRequestDto lockerCreateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.create(userDetails.getUser(), lockerCreateRequestDto);
}
@@ -67,15 +69,16 @@ public LockerResponseDto create(
@Operation(summary = "사물함 상태 update Api", description = "사물함 상태를 변경하는 Api입니다.\n" +
"허용 동작 목록: \"ENABLE(관리자/회장 전용)\", \"DISABLE(관리자/회장 전용)\", \"REGISTER\", \"RETURN\", \"EXTEND\"")
public LockerResponseDto update(
- @PathVariable("lockerId") String lockerId,
- @Valid @RequestBody LockerUpdateRequestDto lockerUpdateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("lockerId")
+ String lockerId,
+ @Valid @RequestBody
+ LockerUpdateRequestDto lockerUpdateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.update(
userDetails.getUser(),
lockerId,
- lockerUpdateRequestDto
- );
+ lockerUpdateRequestDto);
}
@PutMapping(value = "/{lockerId}/move")
@@ -83,15 +86,16 @@ public LockerResponseDto update(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "사물함 위치 이동 Api(관리자/회장 전용)", description = "사물함의 위치(locker location)를 이동(변경)시키는 Api입니다. ex) 1번 사물함에 있어서 1층 1번 -> 2층 1번, 층만 바뀜")
public LockerResponseDto move(
- @PathVariable("lockerId") String lockerId,
- @Valid @RequestBody LockerMoveRequestDto lockerMoveRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("lockerId")
+ String lockerId,
+ @Valid @RequestBody
+ LockerMoveRequestDto lockerMoveRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.move(
userDetails.getUser(),
lockerId,
- lockerMoveRequestDto
- );
+ lockerMoveRequestDto);
}
@DeleteMapping(value = "/{lockerId}")
@@ -99,16 +103,18 @@ public LockerResponseDto move(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "사물함 삭제 Api(관리자/회장 전용)", description = "사물함을 삭제하는 Api입니다.")
public LockerResponseDto delete(
- @PathVariable("lockerId") String lockerId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("lockerId")
+ String lockerId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.delete(userDetails.getUser(), lockerId);
}
@GetMapping(value = "/locations")
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "사물함 층별 사용가능 여부 조회 Api", description = "사물함 층별 개수 정보와 사용 가능 개수를 제공하는 API입니다.")
- public LockerLocationsResponseDto findAllLocation(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ public LockerLocationsResponseDto findAllLocation(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.findAllLocation(userDetails.getUser());
}
@@ -116,9 +122,10 @@ public LockerLocationsResponseDto findAllLocation(@AuthenticationPrincipal Custo
@Operation(summary = "사물함 특정 층별 사용가능 여부 조회 Api", description = "사물함 특정 층별 개수 정보와 사용 가능 개수를 제공하는 API입니다.")
@ResponseStatus(value = HttpStatus.OK)
public LockersResponseDto findByLocation(
- @PathVariable("locationId") String locationId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("locationId")
+ String locationId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.findByLocation(locationId, userDetails.getUser());
}
@@ -127,9 +134,10 @@ public LockersResponseDto findByLocation(
@ResponseStatus(value = HttpStatus.CREATED)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public LockerLocationResponseDto createLocation(
- @Valid @RequestBody LockerLocationCreateRequestDto lockerLocationCreateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ LockerLocationCreateRequestDto lockerLocationCreateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.createLocation(userDetails.getUser(), lockerLocationCreateRequestDto);
}
@@ -138,15 +146,16 @@ public LockerLocationResponseDto createLocation(
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public LockerLocationResponseDto updateLocation(
- @PathVariable("locationId") String locationId,
- @Valid @RequestBody LockerLocationUpdateRequestDto lockerLocationUpdateRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("locationId")
+ String locationId,
+ @Valid @RequestBody
+ LockerLocationUpdateRequestDto lockerLocationUpdateRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.updateLocation(
userDetails.getUser(),
locationId,
- lockerLocationUpdateRequestDto
- );
+ lockerLocationUpdateRequestDto);
}
@DeleteMapping(value = "/locations/{locationId}")
@@ -154,9 +163,10 @@ public LockerLocationResponseDto updateLocation(
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public LockerLocationResponseDto deleteLocation(
- @PathVariable("locationId") String locationId,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("locationId")
+ String locationId,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.lockerService.deleteLocation(userDetails.getUser(), locationId);
}
@@ -165,8 +175,8 @@ public LockerLocationResponseDto deleteLocation(
@Operation(summary = "사물함 로그 조회 API(관리자/회장 전용)", description = "사물함 로그를 조회하는 API입니다.")
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public List findLog(
- @PathVariable("lockerId") String lockerId
- ) {
+ @PathVariable("lockerId")
+ String lockerId) {
return this.lockerService.findLog(lockerId);
}
@@ -175,9 +185,10 @@ public List findLog(
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public void setExpireDate(
- @Valid @RequestBody LockerExpiredAtRequestDto lockerExpiredAtRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ LockerExpiredAtRequestDto lockerExpiredAtRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.lockerService.setExpireAt(userDetails.getUser(), lockerExpiredAtRequestDto);
}
@@ -186,9 +197,10 @@ public void setExpireDate(
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public void setExtendPeriod(
- @Valid @RequestBody LockerExtendPeriodRequestDto lockerExtendPeriodRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ LockerExtendPeriodRequestDto lockerExtendPeriodRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.lockerService.setExtendPeriod(userDetails.getUser(), lockerExtendPeriodRequestDto);
}
@@ -197,9 +209,10 @@ public void setExtendPeriod(
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
public void setRegisterPeriod(
- @Valid @RequestBody LockerRegisterPeriodRequestDto lockerRegisterPeriodRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ LockerRegisterPeriodRequestDto lockerRegisterPeriodRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.lockerService.setRegisterPeriod(userDetails.getUser(), lockerRegisterPeriodRequestDto);
}
@@ -207,7 +220,8 @@ public void setRegisterPeriod(
@Operation(summary = "사물함 전체 생성 API(관리자/회장 전용)", description = "현재 존재하는 모든 사물함을 생성하는 API입니다.")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- public void createAllLockers(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ public void createAllLockers(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.lockerService.createAllLockers(userDetails.getUser());
}
@@ -215,7 +229,8 @@ public void createAllLockers(@AuthenticationPrincipal CustomUserDetails userDeta
@Operation(summary = "만료된 사물함 일괄 반납 API(관리자/회장 전용)", description = "만료된 사물함을 일괄 반납 처리하는 API입니다.")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- public void returnExpiredLockers(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ public void returnExpiredLockers(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.lockerService.returnExpiredLockers(userDetails.getUser());
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/NotificationLogController.java b/app-main/src/main/java/net/causw/app/main/api/NotificationLogController.java
index 6f720d932..640a254ca 100644
--- a/app-main/src/main/java/net/causw/app/main/api/NotificationLogController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/NotificationLogController.java
@@ -13,10 +13,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.notification.NotificationCountResponseDto;
import net.causw.app.main.api.dto.notification.NotificationResponseDto;
import net.causw.app.main.domain.notification.notification.service.NotificationLogService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
@@ -31,9 +31,10 @@ public class NotificationLogController {
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "유저에게 온 일반 알람 조회", description = "유저의 일반 알림을 조회합니다.")
public Page getGeneralNotification(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return notificationLogService.getGeneralNotification(userDetails.getUser(), pageNum);
}
@@ -41,54 +42,52 @@ public Page getGeneralNotification(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "유저에게 온 경조사 알람 조회", description = "유저의 경조사 알람을 조회합니다.")
public Page getCeremonyNotification(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return notificationLogService.getCeremonyNotification(userDetails.getUser(), pageNum);
}
@GetMapping("/general/top4")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "유저에게 온 일반 알람 조회"
- , description = "유저의 일반 알림을 조회합니다.
" +
+ @Operation(summary = "유저에게 온 일반 알람 조회", description = "유저의 일반 알림을 조회합니다.
" +
"해당 api는 웹상의 사이드 바 형태의 읽지 않은 알람 4개를 표시할 때 사용됩니다.")
public List getGeneralNotificationTop4(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return notificationLogService.getGeneralNotificationTop4(userDetails.getUser());
}
@GetMapping("/ceremony/top4")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "유저에게 온 경조사 알람 조회"
- , description = "유저의 경조사 알림을 조회합니다.
" +
+ @Operation(summary = "유저에게 온 경조사 알람 조회", description = "유저의 경조사 알림을 조회합니다.
" +
"해당 api는 웹상의 사이드 바 형태의 읽지 않은 알람 4개를 표시할 때 사용됩니다.")
public List getCeremonyNotificationTop4(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return notificationLogService.getCeremonyNotificationTop4(userDetails.getUser());
}
@PostMapping("/isRead/{id}")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "유저에게 온 알람 읽음 여부 변경",
- description = "유저의 알람 조회 여부를 참으로 변경합니다
" +
- "id에는 notification_log id를 넣어주세요")
+ @Operation(summary = "유저에게 온 알람 읽음 여부 변경", description = "유저의 알람 조회 여부를 참으로 변경합니다
" +
+ "id에는 notification_log id를 넣어주세요")
public void readNotification(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
notificationLogService.readNotification(userDetails.getUser(), id);
}
@GetMapping("/count")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "유저에게 온 일반, 경조사 알림 중 읽지 않은 알림 총 개수 반환",
- description = "유저의 읽지 않은 알림 개수를 반환합니다.
" +
- "UI 상에서 10개 이상은 9+로 표기되기 때문에 10개까지 카운팅 되도록 하였습니다.")
+ @Operation(summary = "유저에게 온 일반, 경조사 알림 중 읽지 않은 알림 총 개수 반환", description = "유저의 읽지 않은 알림 개수를 반환합니다.
" +
+ "UI 상에서 10개 이상은 9+로 표기되기 때문에 10개까지 카운팅 되도록 하였습니다.")
public NotificationCountResponseDto getNotificationLogCount(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return notificationLogService.getNotificationLogCount(userDetails.getUser());
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/PostController.java b/app-main/src/main/java/net/causw/app/main/api/PostController.java
index 87c6ea753..7f87aefa1 100644
--- a/app-main/src/main/java/net/causw/app/main/api/PostController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/PostController.java
@@ -17,8 +17,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.community.post.service.PostService;
import net.causw.app.main.api.dto.post.BoardPostsResponseDto;
import net.causw.app.main.api.dto.post.PostCreateRequestDto;
import net.causw.app.main.api.dto.post.PostCreateResponseDto;
@@ -27,6 +25,8 @@
import net.causw.app.main.api.dto.post.PostSubscribeResponseDto;
import net.causw.app.main.api.dto.post.PostUpdateRequestDto;
import net.causw.app.main.api.dto.post.PostUpdateWithFormRequestDto;
+import net.causw.app.main.domain.community.post.service.PostService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.InternalServerException;
import net.causw.global.exception.UnauthorizedException;
@@ -67,16 +67,16 @@ public class PostController {
@ApiResponse(responseCode = "4102", description = "동아리에서 추방된 사용자입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public PostResponseDto findPostById(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.postService.findPostById(userDetails.getUser(), id);
}
@GetMapping
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 전체 조회 API(완료)",
- description = "전체 게시글을 불러오는 API로 페이지 별로 불러올 수 있습니다. 현재 한 페이지당 20개의 게시글이 조회 가능합니다. 1페이지는 value값이 0입니다.")
+ @Operation(summary = "게시글 전체 조회 API(완료)", description = "전체 게시글을 불러오는 API로 페이지 별로 불러올 수 있습니다. 현재 한 페이지당 20개의 게시글이 조회 가능합니다. 1페이지는 value값이 0입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -95,11 +95,14 @@ public PostResponseDto findPostById(
@ApiResponse(responseCode = "4102", description = "동아리에서 추방된 사용자입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public BoardPostsResponseDto findAllPost(
- @RequestParam("boardId") String boardId, // 게시판 id
- @RequestParam(name = "keyword", defaultValue = "") String keyword,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum, // PageNation
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam("boardId")
+ String boardId, // 게시판 id
+ @RequestParam(name = "keyword", defaultValue = "")
+ String keyword,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum, // PageNation
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.postService.findAllPost(userDetails.getUser(), boardId, keyword, pageNum);
}
@@ -107,16 +110,16 @@ public BoardPostsResponseDto findAllPost(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "앱 자체 공지사항 확인 API(프론트에 없음)", description = "현재 프론트단에 코드가 존재하지 않습니다")
public BoardPostsResponseDto findAllAppNotice(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.postService.findAllAppNotice(userDetails.getUser(), pageNum);
}
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "게시글 생성 API(완료)",
- description = "게시글을 생성하는 API로 각 게시판의 createrolelist에 따라서 작성할 수 있는 권한이 달라집니다.")
+ @Operation(summary = "게시글 생성 API(완료)", description = "게시글을 생성하는 API로 각 게시판의 createrolelist에 따라서 작성할 수 있는 권한이 달라집니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -136,17 +139,18 @@ public BoardPostsResponseDto findAllAppNotice(
@ApiResponse(responseCode = "4107", description = "사용자가 해당 동아리의 동아리장이 아닙니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public PostCreateResponseDto createPost(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "postCreateRequestDto") @Valid PostCreateRequestDto postCreateRequestDto,
- @RequestPart(value = "attachImageList", required = false) List attachImageList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "postCreateRequestDto") @Valid
+ PostCreateRequestDto postCreateRequestDto,
+ @RequestPart(value = "attachImageList", required = false)
+ List attachImageList) {
return this.postService.createPost(userDetails.getUser(), postCreateRequestDto, attachImageList);
}
@PostMapping(value = "/form", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "신청서 첨부 게시글 생성 API(완료)",
- description = "신청서와 함께 게시글을 생성하는 API로 각 게시판의 createrolelist에 따라서 작성할 수 있는 권한이 달라집니다.")
+ @Operation(summary = "신청서 첨부 게시글 생성 API(완료)", description = "신청서와 함께 게시글을 생성하는 API로 각 게시판의 createrolelist에 따라서 작성할 수 있는 권한이 달라집니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -166,18 +170,19 @@ public PostCreateResponseDto createPost(
@ApiResponse(responseCode = "4107", description = "사용자가 해당 동아리의 동아리장이 아닙니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public PostCreateResponseDto createPostWithForm(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "postCreateWithFormRequestDto") @Valid PostCreateWithFormRequestDto postCreateWithFormRequestDto,
- @RequestPart(value = "attachImageList", required = false) List attachImageList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "postCreateWithFormRequestDto") @Valid
+ PostCreateWithFormRequestDto postCreateWithFormRequestDto,
+ @RequestPart(value = "attachImageList", required = false)
+ List attachImageList) {
return this.postService.createPostWithForm(userDetails.getUser(), postCreateWithFormRequestDto,
attachImageList);
}
@DeleteMapping(value = "/{id}")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 삭제 API(완료)",
- description = "게시글을 삭제하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 삭제 가능합니다.")
+ @Operation(summary = "게시글 삭제 API(완료)", description = "게시글을 삭제하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 삭제 가능합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -199,9 +204,10 @@ public PostCreateResponseDto createPostWithForm(
@ApiResponse(responseCode = "5000", description = "Post id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void deletePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
postService.deletePost(userDetails.getUser(), id);
}
@@ -215,8 +221,7 @@ public void deletePost(
*/
@PutMapping(value = "/{id}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 업데이트 API(완료)",
- description = "게시글을 업데이트하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 업데이트 가능합니다. 기존에 신청서가 있었던 게시글의 경우 신청서가 사라집니다.")
+ @Operation(summary = "게시글 업데이트 API(완료)", description = "게시글을 업데이트하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 업데이트 가능합니다. 기존에 신청서가 있었던 게시글의 경우 신청서가 사라집니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -241,24 +246,25 @@ public void deletePost(
@ApiResponse(responseCode = "5000", description = "Post id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void updatePost(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id,
- @RequestPart(value = "postUpdateRequestDto") @Valid PostUpdateRequestDto postUpdateRequestDto,
- @RequestPart(value = "attachImageList", required = false) List attachImageList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id,
+ @RequestPart(value = "postUpdateRequestDto") @Valid
+ PostUpdateRequestDto postUpdateRequestDto,
+ @RequestPart(value = "attachImageList", required = false)
+ List attachImageList) {
postService.updatePost(
userDetails.getUser(),
id,
postUpdateRequestDto,
- attachImageList
- );
+ attachImageList);
}
@PutMapping(value = "/{id}/form", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "신청서 첨부 게시글 업데이트 API(완료)",
- description = "신청서와 함께 게시글을 업데이트하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 업데이트 가능합니다.")
+ @Operation(summary = "신청서 첨부 게시글 업데이트 API(완료)", description = "신청서와 함께 게시글을 업데이트하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 업데이트 가능합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -283,18 +289,20 @@ public void updatePost(
@ApiResponse(responseCode = "5000", description = "Post id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void updatePostWithForm(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id,
- @RequestPart(value = "postUpdateWithFormRequestDto") @Valid PostUpdateWithFormRequestDto postUpdateWithFormRequestDto,
- @RequestPart(value = "attachImageList", required = false) List attachImageList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id,
+ @RequestPart(value = "postUpdateWithFormRequestDto") @Valid
+ PostUpdateWithFormRequestDto postUpdateWithFormRequestDto,
+ @RequestPart(value = "attachImageList", required = false)
+ List attachImageList) {
postService.updatePostWithForm(userDetails.getUser(), id, postUpdateWithFormRequestDto, attachImageList);
}
@PutMapping(value = "/{id}/restore")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 복구 API(완료)",
- description = "게시글을 복구하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 복구 가능합니다.")
+ @Operation(summary = "게시글 복구 API(완료)", description = "게시글을 복구하는 API로 작성자 본인이나 해당 게시판이 속한 동아리의 동아리장, 관리자, 학생회장의 경우 복구 가능합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -319,19 +327,18 @@ public void updatePostWithForm(
@ApiResponse(responseCode = "5000", description = "Post id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void restorePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
postService.restorePost(
userDetails.getUser(),
- id
- );
+ id);
}
@PostMapping(value = "/{id}/like")
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "게시글 좋아요 저장 API(완료)",
- description = "특정 유저가 특정 게시글에 좋아요를 누른 걸 저장하는 Api 입니다.")
+ @Operation(summary = "게시글 좋아요 저장 API(완료)", description = "특정 유저가 특정 게시글에 좋아요를 누른 걸 저장하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -344,16 +351,16 @@ public void restorePost(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void likePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.postService.likePost(userDetails.getUser(), id);
}
@DeleteMapping(value = "/{id}/like")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 좋아요 취소 API(완료)",
- description = "특정 유저가 특정 게시글에 좋아요를 누른 걸 취소하는 Api 입니다.")
+ @Operation(summary = "게시글 좋아요 취소 API(완료)", description = "특정 유저가 특정 게시글에 좋아요를 누른 걸 취소하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -366,16 +373,16 @@ public void likePost(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void cancelLikePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.postService.cancelLikePost(userDetails.getUser(), id);
}
@PostMapping(value = "/{id}/favorite")
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "게시글 즐겨찾기 저장 API(완료)",
- description = "특정 유저가 특정 게시글에 즐겨찾기를 누른 걸 저장하는 Api 입니다.")
+ @Operation(summary = "게시글 즐겨찾기 저장 API(완료)", description = "특정 유저가 특정 게시글에 즐겨찾기를 누른 걸 저장하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -389,16 +396,16 @@ public void cancelLikePost(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void favoritePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.postService.favoritePost(userDetails.getUser(), id);
}
@DeleteMapping(value = "/{id}/favorite")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "게시글 즐겨찾기 취소 API(완료)",
- description = "특정 유저가 특정 게시글에 즐겨찾기를 누른 걸 취소하는 Api 입니다.")
+ @Operation(summary = "게시글 즐겨찾기 취소 API(완료)", description = "특정 유저가 특정 게시글에 즐겨찾기를 누른 걸 취소하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -413,31 +420,32 @@ public void favoritePost(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public void cancelFavoritePost(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
this.postService.cancelFavoritePost(userDetails.getUser(), id);
}
@PostMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 게시글 알람 설정 켜기"
- , description = "id에는 post id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 게시글 알람 설정 켜기", description = "id에는 post id 값을 넣어주세요")
public PostSubscribeResponseDto subscribePost(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return postService.setPostSubscribe(userDetails.getUser(), id, true);
}
@DeleteMapping("/subscribe/{id}")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "로그인한 사용자의 게시글 알람 설정 끄기"
- , description = "id에는 post id 값을 넣어주세요")
+ @Operation(summary = "로그인한 사용자의 게시글 알람 설정 끄기", description = "id에는 post id 값을 넣어주세요")
public PostSubscribeResponseDto unsubscribePost(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("id") String id
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("id")
+ String id) {
return postService.setPostSubscribe(userDetails.getUser(), id, false);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/ReportController.java b/app-main/src/main/java/net/causw/app/main/api/ReportController.java
index 19e441696..2ed347d0e 100644
--- a/app-main/src/main/java/net/causw/app/main/api/ReportController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/ReportController.java
@@ -13,13 +13,13 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.report.ReportCreateRequestDto;
import net.causw.app.main.api.dto.report.ReportCreateResponseDto;
import net.causw.app.main.api.dto.report.ReportedCommentResponseDto;
import net.causw.app.main.api.dto.report.ReportedPostResponseDto;
import net.causw.app.main.api.dto.report.ReportedUserResponseDto;
import net.causw.app.main.domain.community.report.service.ReportService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.UnauthorizedException;
@@ -48,9 +48,10 @@ public class ReportController {
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public ReportCreateResponseDto createReport(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid ReportCreateRequestDto request
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ ReportCreateRequestDto request) {
return reportService.createReport(userDetails.getUser(), request);
}
@@ -63,8 +64,8 @@ public ReportCreateResponseDto createReport(
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public Page getReportedPosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return reportService.getReportedPosts(pageNum);
}
@@ -77,8 +78,8 @@ public Page getReportedPosts(
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public Page getReportedComments(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return reportService.getReportedComments(pageNum);
}
@@ -91,8 +92,8 @@ public Page getReportedComments(
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public Page getReportedUsers(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return reportService.getReportedUsers(pageNum);
}
@@ -105,10 +106,10 @@ public Page getReportedUsers(
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public Page getReportedPostsByUser(
- @Parameter(description = "사용자 ID", example = "user-uuid")
- @PathVariable String userId,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @Parameter(description = "사용자 ID", example = "user-uuid") @PathVariable
+ String userId,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return reportService.getReportedPostsByUser(userId, pageNum);
}
@@ -121,10 +122,10 @@ public Page getReportedPostsByUser(
@ApiResponse(responseCode = "401", description = "권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UnauthorizedException.class)))
})
public Page getReportedCommentsByUser(
- @Parameter(description = "사용자 ID", example = "user-uuid")
- @PathVariable String userId,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum
- ) {
+ @Parameter(description = "사용자 ID", example = "user-uuid") @PathVariable
+ String userId,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum) {
return reportService.getReportedCommentsByUser(userId, pageNum);
}
}
\ No newline at end of file
diff --git a/app-main/src/main/java/net/causw/app/main/api/SemesterController.java b/app-main/src/main/java/net/causw/app/main/api/SemesterController.java
index 058ca4ff3..92f8bc0bd 100644
--- a/app-main/src/main/java/net/causw/app/main/api/SemesterController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/SemesterController.java
@@ -14,10 +14,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.semester.CreateSemesterRequestDto;
import net.causw.app.main.api.dto.semester.CurrentSemesterResponseDto;
import net.causw.app.main.domain.campus.semester.service.SemesterService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
@@ -50,9 +50,10 @@ public List getSemesterList() {
@PreAuthorize("@security.hasRole(@Role.ADMIN)")
@Operation(summary = "학기 생성(개발 테스트 및 관리자용)", description = "새로운 학기를 생성합니다.")
public void createSemester(
- @RequestBody CreateSemesterRequestDto createSemesterRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestBody
+ CreateSemesterRequestDto createSemesterRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
semesterService.createSemester(createSemesterRequestDto, userDetails.getUser());
}
@@ -65,8 +66,8 @@ public void createSemester(
@PreAuthorize("@security.hasRoleGroup(RoleGroup.EXECUTIVES)")
@Operation(summary = "다음 학기 생성(재학 인증 일괄 요청)", description = "다음 학기를 생성합니다. 자동으로 재학 인증도 일괄 요청 됩니다.")
public void createNextSemester(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
semesterService.createNextSemester(userDetails.getUser());
}
@@ -75,8 +76,8 @@ public void createNextSemester(
@PreAuthorize("@security.hasRole(@Role.ADMIN)")
@Operation(summary = "학기 삭제(개발 테스트 및 관리자용)", description = "특정 학기를 삭제합니다.")
public void deleteSemester(
- @PathVariable(value = "semesterId") String semesterId
- ) {
+ @PathVariable(value = "semesterId")
+ String semesterId) {
semesterService.deleteSemester(semesterId);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/StorageController.java b/app-main/src/main/java/net/causw/app/main/api/StorageController.java
index e41cc8eeb..de094c8ad 100644
--- a/app-main/src/main/java/net/causw/app/main/api/StorageController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/StorageController.java
@@ -1,6 +1,6 @@
package net.causw.app.main.api;
-import static org.springframework.util.MimeTypeUtils.*;
+import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -27,9 +27,10 @@ public class StorageController {
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("@security.hasRole(@Role.ADMIN)")
public FileResponseDto post(
- @RequestPart("file") MultipartFile multipartFile,
- @RequestParam("type") FilePath filePath
- ) {
+ @RequestPart("file")
+ MultipartFile multipartFile,
+ @RequestParam("type")
+ FilePath filePath) {
return FileResponseDto.from(uuidFileService.saveFile(multipartFile, filePath).getFileUrl());
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/UserAcademicRecordApplicationController.java b/app-main/src/main/java/net/causw/app/main/api/UserAcademicRecordApplicationController.java
index 647ab8e51..ef8aea416 100644
--- a/app-main/src/main/java/net/causw/app/main/api/UserAcademicRecordApplicationController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/UserAcademicRecordApplicationController.java
@@ -20,7 +20,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.semester.CurrentSemesterResponseDto;
import net.causw.app.main.api.dto.user.UserAcademicStatusNoteUpdateDto;
import net.causw.app.main.api.dto.userAcademicRecordApplication.CreateUserAcademicRecordApplicationRequestDto;
@@ -35,6 +34,7 @@
import net.causw.app.main.domain.campus.semester.service.SemesterService;
import net.causw.app.main.domain.user.academic.enums.userAcademicRecord.AcademicStatus;
import net.causw.app.main.domain.user.academic.service.UserAcademicRecordApplicationService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletResponse;
@@ -52,18 +52,15 @@ public class UserAcademicRecordApplicationController {
@GetMapping("/export")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학적 정보 엑셀 파일로 내보내기(관리자용)",
- description = "학적 정보를 엑셀 파일로 내보냅니다.")
+ @Operation(summary = "학적 정보 엑셀 파일로 내보내기(관리자용)", description = "학적 정보를 엑셀 파일로 내보냅니다.")
public void exportUserAcademicRecord(
- HttpServletResponse response
- ) {
+ HttpServletResponse response) {
userAcademicRecordApplicationService.exportUserAcademicRecordListToExcel(response);
}
@GetMapping("/semester/current")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "현재 학기 조회",
- description = "현재 학기를 조회합니다.")
+ @Operation(summary = "현재 학기 조회", description = "현재 학기를 조회합니다.")
public CurrentSemesterResponseDto getCurrentSemesterYearAndType() {
return semesterService.getCurrentSemester();
}
@@ -76,11 +73,10 @@ public CurrentSemesterResponseDto getCurrentSemesterYearAndType() {
@GetMapping("/list/active-users")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "전체 유저의 학적 정보 목록 조회(관리자용)",
- description = "전체 유저의 학적 정보 목록을 조회합니다.")
+ @Operation(summary = "전체 유저의 학적 정보 목록 조회(관리자용)", description = "전체 유저의 학적 정보 목록을 조회합니다.")
public Page getAllUserAcademicRecordPage(
- @ParameterObject Pageable pageable
- ) {
+ @ParameterObject
+ Pageable pageable) {
return userAcademicRecordApplicationService.getAllUserAcademicRecordPage(pageable);
}
@@ -92,11 +88,10 @@ public Page getAllUserAcademicRecordPage(
@GetMapping("/list/await")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "전체 학적 인증 승인 대기 목록 조회(관리자용)",
- description = "전체 학적 인증 승인 대기 목록 조회합니다.")
+ @Operation(summary = "전체 학적 인증 승인 대기 목록 조회(관리자용)", description = "전체 학적 인증 승인 대기 목록 조회합니다.")
public Page getAllUserAwaitingAcademicRecordPage(
- @ParameterObject Pageable pageable
- ) {
+ @ParameterObject
+ Pageable pageable) {
return userAcademicRecordApplicationService.getAllUserAwaitingAcademicRecordPage(pageable);
}
@@ -108,11 +103,10 @@ public Page getAllUserAwaitingAcad
@GetMapping("/record/{userId}")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "유저 학적 정보 상세 보기(관리자용)",
- description = "유저 학적 정보 상세를 조회합니다.")
+ @Operation(summary = "유저 학적 정보 상세 보기(관리자용)", description = "유저 학적 정보 상세를 조회합니다.")
public UserAcademicRecordInfoResponseDto getUserAcademicRecordInfo(
- @PathVariable("userId") String userId
- ) {
+ @PathVariable("userId")
+ String userId) {
return userAcademicRecordApplicationService.getUserAcademicRecordInfo(userId);
}
@@ -125,12 +119,12 @@ public UserAcademicRecordInfoResponseDto getUserAcademicRecordInfo(
@PutMapping("/record/{userId}")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "유저 학적 정보 노트 변경(관리자용)",
- description = "유저 학적 정보 노트를 변경합니다.")
+ @Operation(summary = "유저 학적 정보 노트 변경(관리자용)", description = "유저 학적 정보 노트를 변경합니다.")
public UserAcademicRecordInfoResponseDto updateUserAcademicRecordNote(
- @PathVariable("userId") String userId,
- @RequestBody UserAcademicStatusNoteUpdateDto userAcademicStatusNoteUpdateDto
- ) {
+ @PathVariable("userId")
+ String userId,
+ @RequestBody
+ UserAcademicStatusNoteUpdateDto userAcademicStatusNoteUpdateDto) {
return userAcademicRecordApplicationService.updateUserAcademicRecordNote(userId,
userAcademicStatusNoteUpdateDto);
}
@@ -144,12 +138,12 @@ public UserAcademicRecordInfoResponseDto updateUserAcademicRecordNote(
@GetMapping("/application/{userId}/{applicationId}")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "유저 학적 승인 요청 상세 보기(관리자용)",
- description = "유저 학적 승인 요청 상세를 조회합니다.")
+ @Operation(summary = "유저 학적 승인 요청 상세 보기(관리자용)", description = "유저 학적 승인 요청 상세를 조회합니다.")
public UserAcademicRecordApplicationInfoResponseDto getUserAcademicRecordApplicationInfo(
- @PathVariable("userId") String userId,
- @PathVariable("applicationId") String applicationId
- ) {
+ @PathVariable("userId")
+ String userId,
+ @PathVariable("applicationId")
+ String applicationId) {
return userAcademicRecordApplicationService.getUserAcademicRecordApplicationInfo(userId, applicationId);
}
@@ -162,12 +156,12 @@ public UserAcademicRecordApplicationInfoResponseDto getUserAcademicRecordApplica
@PutMapping("/update")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "유저 학적 정보 상태 변경(관리자용)",
- description = "유저 학적 정보 상태를 변경합니다.")
+ @Operation(summary = "유저 학적 정보 상태 변경(관리자용)", description = "유저 학적 정보 상태를 변경합니다.")
public UserAcademicRecordInfoResponseDto updateUserAcademicStatus(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid UpdateUserAcademicStatusRequestDto updateUserAcademicStatusRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ UpdateUserAcademicStatusRequestDto updateUserAcademicStatusRequestDto) {
return userAcademicRecordApplicationService.updateUserAcademicStatus(userDetails.getUser(),
updateUserAcademicStatusRequestDto);
}
@@ -181,12 +175,12 @@ public UserAcademicRecordInfoResponseDto updateUserAcademicStatus(
@PutMapping("/application/admin")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "유저 학적 인증 승인 상태 변경(승인/거부)(관리자용)",
- description = "유저 학적 인증 승인 상태를 변경합니다.")
+ @Operation(summary = "유저 학적 인증 승인 상태 변경(승인/거부)(관리자용)", description = "유저 학적 인증 승인 상태를 변경합니다.")
public UserAcademicRecordApplicationResponseDto updateUserAcademicRecordApplicationStatus(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid UpdateUserAcademicRecordApplicationStateRequestDto updateUserAcademicRecordApplicationStateRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ UpdateUserAcademicRecordApplicationStateRequestDto updateUserAcademicRecordApplicationStateRequestDto) {
return userAcademicRecordApplicationService.updateUserAcademicRecordApplicationStatus(userDetails.getUser(),
updateUserAcademicRecordApplicationStateRequestDto);
}
@@ -197,11 +191,10 @@ public UserAcademicRecordApplicationResponseDto updateUserAcademicRecordApplicat
*/
@GetMapping("current")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "사용자 본인의 학적 증빙 상태 조회",
- description = "사용자 본인의 학적 증빙 상태를 조회합니다.")
+ @Operation(summary = "사용자 본인의 학적 증빙 상태 조회", description = "사용자 본인의 학적 증빙 상태를 조회합니다.")
public AcademicStatus getCurrentUserAcademicRecord(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userAcademicRecordApplicationService.getCurrentUserAcademicRecord(userDetails.getUser());
}
@@ -211,11 +204,10 @@ public AcademicStatus getCurrentUserAcademicRecord(
*/
@GetMapping("current/not-accepted")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "사용자 본인의 학적 증빙 제출 서류 조회(승인 대기/거절 중인 것만)",
- description = "사용자 본인의 대기/거절 중인 학적 증빙 제출 서류를 조회합니다.")
+ @Operation(summary = "사용자 본인의 학적 증빙 제출 서류 조회(승인 대기/거절 중인 것만)", description = "사용자 본인의 대기/거절 중인 학적 증빙 제출 서류를 조회합니다.")
public CurrentUserAcademicRecordApplicationResponseDto getCurrentUserAcademicRecordApplication(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userAcademicRecordApplicationService.getCurrentUserAcademicRecordApplication(userDetails.getUser());
}
@@ -228,13 +220,14 @@ public CurrentUserAcademicRecordApplicationResponseDto getCurrentUserAcademicRec
*/
@PostMapping(value = "/application/create", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "사용자 본인의 학적 증빙 서류 제출",
- description = "사용자 본인의 학적 증빙 서류를 제출합니다.")
+ @Operation(summary = "사용자 본인의 학적 증빙 서류 제출", description = "사용자 본인의 학적 증빙 서류를 제출합니다.")
public UserAcademicRecordApplicationResponseDto createUserAcademicRecordApplication(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "createUserAcademicRecordApplicationRequestDto") @Valid CreateUserAcademicRecordApplicationRequestDto createUserAcademicRecordApplicationRequestDto,
- @RequestPart(value = "imageFileList", required = false) List imageFileList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "createUserAcademicRecordApplicationRequestDto") @Valid
+ CreateUserAcademicRecordApplicationRequestDto createUserAcademicRecordApplicationRequestDto,
+ @RequestPart(value = "imageFileList", required = false)
+ List imageFileList) {
return userAcademicRecordApplicationService.createUserAcademicRecordApplication(userDetails.getUser().getId(),
createUserAcademicRecordApplicationRequestDto, imageFileList);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/UserBlockController.java b/app-main/src/main/java/net/causw/app/main/api/UserBlockController.java
index f4dd6682d..5ea13f3d5 100644
--- a/app-main/src/main/java/net/causw/app/main/api/UserBlockController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/UserBlockController.java
@@ -1,6 +1,6 @@
package net.causw.app.main.api;
-import static org.springframework.util.MimeTypeUtils.*;
+import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
import org.springframework.http.HttpStatus;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
@@ -10,10 +10,10 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.userBlock.response.CreateBlockByChildCommentResponseDto;
import net.causw.app.main.api.dto.userBlock.response.CreateBlockByCommentResponseDto;
import net.causw.app.main.api.dto.userBlock.response.CreateBlockByPostResponseDto;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.domain.user.relation.service.BlockByChildCommentUseCaseService;
import net.causw.app.main.domain.user.relation.service.BlockByCommentUseCaseService;
import net.causw.app.main.domain.user.relation.service.BlockByPostUseCaseService;
@@ -34,8 +34,10 @@ public class UserBlockController {
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "게시물을 통한 차단 api", description = "게시물을 통해 유저를 차단할 수 있습니다.")
public CreateBlockByPostResponseDto createBlockByPost(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("postId") String postId
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("postId")
+ String postId
) {
return blockByPostUseCaseService.execute(userDetails, postId);
@@ -45,8 +47,10 @@ public CreateBlockByPostResponseDto createBlockByPost(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "댓글을 통한 차단 api", description = "댓글을 통해 유저를 차단할 수 있습니다.")
public CreateBlockByCommentResponseDto createBlockByComment(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("commentId") String commentId
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("commentId")
+ String commentId
) {
return blockByCommentUseCaseService.execute(userDetails, commentId);
@@ -56,8 +60,10 @@ public CreateBlockByCommentResponseDto createBlockByComment(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "대댓글을 통한 차단 api", description = "대댓글을 통해 유저를 차단할 수 있습니다.")
public CreateBlockByChildCommentResponseDto createBlockByChildComment(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("childCommentId") String childCommentId
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("childCommentId")
+ String childCommentId
) {
return blockByChildCommentUseCaseService.execute(userDetails, childCommentId);
diff --git a/app-main/src/main/java/net/causw/app/main/api/UserController.java b/app-main/src/main/java/net/causw/app/main/api/UserController.java
index a932fa641..0a458d53c 100644
--- a/app-main/src/main/java/net/causw/app/main/api/UserController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/UserController.java
@@ -21,7 +21,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.circle.CircleResponseDto;
import net.causw.app.main.api.dto.duplicate.DuplicatedCheckResponseDto;
import net.causw.app.main.api.dto.user.BatchRegisterResponseDto;
@@ -51,6 +50,7 @@
import net.causw.app.main.domain.user.account.service.RegisterGraduatedUsersUseCaseService;
import net.causw.app.main.domain.user.account.service.UserRoleService;
import net.causw.app.main.domain.user.account.service.UserService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.UnauthorizedException;
@@ -81,8 +81,7 @@ public class UserController {
@GetMapping(value = "/{userId}")
@ResponseStatus(value = HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES_AND_CIRCLE_LEADER)")
- @Operation(summary = "사용자 정보 조회 API (완료)",
- description = "userId에는 사용자 고유 id 값을 입력해주세요.")
+ @Operation(summary = "사용자 정보 조회 API (완료)", description = "userId에는 사용자 고유 id 값을 입력해주세요.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -94,9 +93,10 @@ public class UserController {
@ApiResponse(responseCode = "4108", description = "해당 유저는 소모임 회원이 아닙니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserResponseDto findByUserId(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @PathVariable("userId") String userId
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @PathVariable("userId")
+ String userId) {
return this.userService.findByUserId(userId, userDetails.getUser());
}
@@ -106,8 +106,7 @@ public UserResponseDto findByUserId(
*/
@GetMapping(value = "/me")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "로그인한 사용자 정보 조회 API (완료)",
- description = "현재 로그인한 사용자의 정보를 조회합니다.")
+ @Operation(summary = "로그인한 사용자 정보 조회 API (완료)", description = "현재 로그인한 사용자의 정보를 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -116,8 +115,8 @@ public UserResponseDto findByUserId(
@ApiResponse(responseCode = "5000", description = "소모임장이 아닙니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserResponseDto findCurrentUser(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findCurrentUser(userDetails.getUser());
}
@@ -126,16 +125,16 @@ public UserResponseDto findCurrentUser(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "(구)로그인한 사용자의 게시글 조회 API(삭제 예정 -> posts/written으로 변경)")
public UserPostsResponseDto findPosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findPosts(userDetails.getUser(), pageNum);
}
@GetMapping(value = "/posts/written")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "로그인한 사용자가 작성한 게시글 기록 조회 API(완료)",
- description = "로그인한 사용자가 작성한 게시글의 목록을 조회하는 Api 입니다.")
+ @Operation(summary = "로그인한 사용자가 작성한 게시글 기록 조회 API(완료)", description = "로그인한 사용자가 작성한 게시글의 목록을 조회하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -146,16 +145,16 @@ public UserPostsResponseDto findPosts(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public UserPostsResponseDto findMyWrittenPosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findPosts(userDetails.getUser(), pageNum);
}
@GetMapping(value = "/posts/favorite")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "로그인한 사용자가 누른 즐겨찾기 게시글 기록 조회 API(완료)",
- description = "로그인한 사용자가 즐겨찾기한 게시글의 목록을 조회하는 Api 입니다.")
+ @Operation(summary = "로그인한 사용자가 누른 즐겨찾기 게시글 기록 조회 API(완료)", description = "로그인한 사용자가 즐겨찾기한 게시글의 목록을 조회하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -166,16 +165,16 @@ public UserPostsResponseDto findMyWrittenPosts(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public UserPostsResponseDto findMyFavoritePosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findFavoritePosts(userDetails.getUser(), pageNum);
}
@GetMapping(value = "/posts/like")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "로그인한 사용자가 좋아요 누른 게시글 기록 조회 API(완료)",
- description = "로그인한 사용자가 좋아요 누른 게시글의 목록을 조회하는 Api 입니다.")
+ @Operation(summary = "로그인한 사용자가 좋아요 누른 게시글 기록 조회 API(완료)", description = "로그인한 사용자가 좋아요 누른 게시글의 목록을 조회하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserPostsResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -186,16 +185,16 @@ public UserPostsResponseDto findMyFavoritePosts(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public UserPostsResponseDto findMyLikePosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findLikePosts(userDetails.getUser(), pageNum);
}
@GetMapping(value = "/comments/written")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "로그인한 사용자가 작성한 댓글들의 게시물 기록 조회 API(완료)",
- description = "로그인한 사용자가 작성한 댓글들의 게시물 기록 조회하는 Api 입니다.")
+ @Operation(summary = "로그인한 사용자가 작성한 댓글들의 게시물 기록 조회 API(완료)", description = "로그인한 사용자가 작성한 댓글들의 게시물 기록 조회하는 Api 입니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -206,9 +205,10 @@ public UserPostsResponseDto findMyLikePosts(
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public UserPostsResponseDto findMyCommentedPosts(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findCommentedPosts(userDetails.getUser(), pageNum);
}
@@ -216,9 +216,10 @@ public UserPostsResponseDto findMyCommentedPosts(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "로그인한 사용자의 댓글 조회 API(완료)")
public UserCommentsResponseDto findComments(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findComments(userDetails.getUser(), pageNum);
}
@@ -227,9 +228,10 @@ public UserCommentsResponseDto findComments(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.OPERATIONS_TEAM)")
@Operation(summary = "유저 관리 시 사용자 이름으로 검색 API(완료)")
public List findByName(
- @PathVariable("name") String name,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("name")
+ String name,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findByName(userDetails.getUser(), name);
}
@@ -238,8 +240,8 @@ public List findByName(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "특별한 권한을 가진 사용자 목록 확인 API(완료)", description = "학생회장, 부학생회장, 학생회, 학년대표, 동문회장 역할을 가지는 사용자를 반환합니다. \n 권한 역임을 할 수 있기 때문에 중복되는 사용자가 존재합니다.(ex. PRESIDENT_N_LEADER_CIRCLE)")
public UserPrivilegedResponseDto findPrivilegedUsers(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return findPrivilegedUsersUseCaseService.execute(userDetails.getUser());
}
@@ -248,11 +250,14 @@ public UserPrivilegedResponseDto findPrivilegedUsers(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "유저 관리 시 사용자의 상태(ACTIVE, INACTIVE 등) 에 따라 검색하는 API(완료)", description = "유저를 관리할 때 사용자가 활성, 비활성 상태인지에 따라서 분류하여 검색할 수 있습니다. \n state 는 ACTIVE, INACTIVE, AWAIT, REJECT, DROP 으로 검색가능합니다.")
public Page findByState(
- @PathVariable("state") String state,
- @RequestParam(name = "user name", required = false) String name,
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("state")
+ String state,
+ @RequestParam(name = "user name", required = false)
+ String name,
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findByState(userDetails.getUser(), state, name, pageNum);
}
@@ -274,8 +279,8 @@ public Page findByState(
@ApiResponse(responseCode = "4001", description = "이미 존재하는 전화번호입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserResponseDto signUp(
- @Valid @RequestBody UserCreateRequestDto userCreateDto
- ) {
+ @Valid @RequestBody
+ UserCreateRequestDto userCreateDto) {
return this.userService.signUp(userCreateDto);
}
@@ -298,9 +303,9 @@ public UserResponseDto signUp(
@ApiResponse(responseCode = "4109", description = "가입이 거절된 사용자 입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserSignInResponseDto signIn(
- @RequestBody UserSignInRequestDto userSignInRequestDto,
- HttpServletRequest request
- ) {
+ @RequestBody
+ UserSignInRequestDto userSignInRequestDto,
+ HttpServletRequest request) {
String userAgent = request.getHeader("User-Agent");
String ipAddress = extractClientIp(request);
return this.userService.signIn(userSignInRequestDto);
@@ -331,7 +336,8 @@ private String extractClientIp(HttpServletRequest request) {
@ApiResponse(responseCode = "4001", description = "이미 존재하는 전화번호입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "4001", description = "이미 존재하는 학번입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public BatchRegisterResponseDto registerAlumni(@RequestParam("csvFile") MultipartFile csvFile) {
+ public BatchRegisterResponseDto registerAlumni(@RequestParam("csvFile")
+ MultipartFile csvFile) {
return registerGraduatedUsersUseCaseService.execute(csvFile);
}
@@ -348,7 +354,8 @@ public BatchRegisterResponseDto registerAlumni(@RequestParam("csvFile") Multipar
@ApiResponse(responseCode = "4000", description = "해당 사용자를 찾을 수 없습니다", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "4002", description = "복구할 수 없는 계정 상태입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public UserSignInResponseDto recoverUser(@Valid @RequestBody UserRecoverRequestDto userRecoverRequestDto) {
+ public UserSignInResponseDto recoverUser(@Valid @RequestBody
+ UserRecoverRequestDto userRecoverRequestDto) {
return this.userService.recoverUser(userRecoverRequestDto.getEmail());
}
@@ -364,7 +371,8 @@ public UserSignInResponseDto recoverUser(@Valid @RequestBody UserRecoverRequestD
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4001", description = "탈퇴한 계정의 재가입은 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public DuplicatedCheckResponseDto isDuplicatedEmail(@PathVariable("email") String email) {
+ public DuplicatedCheckResponseDto isDuplicatedEmail(@PathVariable("email")
+ String email) {
return this.userService.isDuplicatedEmail(email);
}
@@ -380,7 +388,8 @@ public DuplicatedCheckResponseDto isDuplicatedEmail(@PathVariable("email") Strin
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4001", description = "탈퇴한 계정의 재가입은 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public DuplicatedCheckResponseDto isDuplicatedNickname(@PathVariable("nickname") String nickname) {
+ public DuplicatedCheckResponseDto isDuplicatedNickname(@PathVariable("nickname")
+ String nickname) {
return this.userService.isDuplicatedNickname(nickname);
}
@@ -397,7 +406,8 @@ public DuplicatedCheckResponseDto isDuplicatedNickname(@PathVariable("nickname")
@ApiResponse(responseCode = "4001", description = "탈퇴한 계정의 재가입은 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public DuplicatedCheckResponseDto isDuplicatedStudentId(@PathVariable("studentId") String studentId) {
+ public DuplicatedCheckResponseDto isDuplicatedStudentId(@PathVariable("studentId")
+ String studentId) {
return this.userService.isDuplicatedStudentId(studentId);
}
@@ -413,7 +423,8 @@ public DuplicatedCheckResponseDto isDuplicatedStudentId(@PathVariable("studentId
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4001", description = "탈퇴한 계정의 재가입은 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public DuplicatedCheckResponseDto isDuplicatedPhoneNumber(@PathVariable("phoneNumber") String phoneNumber) {
+ public DuplicatedCheckResponseDto isDuplicatedPhoneNumber(@PathVariable("phoneNumber")
+ String phoneNumber) {
return this.userService.isDuplicatedPhoneNumber(phoneNumber);
}
@@ -440,58 +451,60 @@ public DuplicatedCheckResponseDto isDuplicatedPhoneNumber(@PathVariable("phoneNu
@ApiResponse(responseCode = "4001", description = "이미 존재하는 전화번호입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserResponseDto update(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "userUpdateDto") @Valid UserUpdateRequestDto userUpdateDto,
- @RequestPart(value = "profileImage", required = false) MultipartFile profileImage
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "userUpdateDto") @Valid
+ UserUpdateRequestDto userUpdateDto,
+ @RequestPart(value = "profileImage", required = false)
+ MultipartFile profileImage) {
return this.userService.update(userDetails.getUser(), userUpdateDto, profileImage);
}
@PutMapping(value = "/{delegateeId}/delegate-role")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(
- summary = "자신의 권한 위임",
- description = """
- 로그인된 사용자가 자신의 권한 중 하나를 특정 사용자에게 위임합니다.
- - 위임자는 해당 권한이 회수 됩니다.
- - 고유 권한(ex. 학생회장 등)을 위임할 경우, 기존 모든 사용자로부터 해당 권한이 제거됩니다.
- - 학생회장 권한 위임 시, 학생회 전체 권한(부회장, 학생회 등)이 초기화됩니다.
- """
- )
+ @Operation(summary = "자신의 권한 위임", description = """
+ 로그인된 사용자가 자신의 권한 중 하나를 특정 사용자에게 위임합니다.
+ - 위임자는 해당 권한이 회수 됩니다.
+ - 고유 권한(ex. 학생회장 등)을 위임할 경우, 기존 모든 사용자로부터 해당 권한이 제거됩니다.
+ - 학생회장 권한 위임 시, 학생회 전체 권한(부회장, 학생회 등)이 초기화됩니다.
+ """)
public UserResponseDto delegateRole(
- @PathVariable("delegateeId") String delegateeId,
- @Valid @RequestBody UserUpdateRoleRequestDto userUpdateRoleRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("delegateeId")
+ String delegateeId,
+ @Valid @RequestBody
+ UserUpdateRoleRequestDto userUpdateRoleRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userRoleService.delegateRole(userDetails.getUser(), delegateeId, userUpdateRoleRequestDto);
}
@PutMapping(value = "/{granteeId}/grant-role")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(
- summary = "타인에게 권한 부여",
- description = """
- 로그인된 사용자가 타인에게 권한을 부여합니다.
- - 부여일 경우 delegatorId는 생략해야 합니다.
- - delegatorId가 존재하면, 위임의 형태로 간주되어 delegator의 권한이 회수됩니다.
- - 고유 권한(ex. 학생회장 등) 부여 시 기존 모든 사용자로부터 해당 권한이 제거됩니다.
- - 학생회장 권한 부여 시, 학생회 전체 권한(부회장, 학생회 등)이 초기화됩니다.
- """
- )
+ @Operation(summary = "타인에게 권한 부여", description = """
+ 로그인된 사용자가 타인에게 권한을 부여합니다.
+ - 부여일 경우 delegatorId는 생략해야 합니다.
+ - delegatorId가 존재하면, 위임의 형태로 간주되어 delegator의 권한이 회수됩니다.
+ - 고유 권한(ex. 학생회장 등) 부여 시 기존 모든 사용자로부터 해당 권한이 제거됩니다.
+ - 학생회장 권한 부여 시, 학생회 전체 권한(부회장, 학생회 등)이 초기화됩니다.
+ """)
public UserResponseDto grantRole(
- @RequestParam(value = "delegatorId", required = false) String delegatorId,
- @PathVariable("granteeId") String granteeId,
- @Valid @RequestBody UserUpdateRoleRequestDto userUpdateRoleRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(value = "delegatorId", required = false)
+ String delegatorId,
+ @PathVariable("granteeId")
+ String granteeId,
+ @Valid @RequestBody
+ UserUpdateRoleRequestDto userUpdateRoleRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userRoleService.grantRole(userDetails.getUser(), delegatorId, granteeId, userUpdateRoleRequestDto);
}
@PutMapping(value = "/password/find")
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "비밀번호 찾기 API (완료)", description = "비밀번호 재설정 이메일 전송 API입니다.")
- public void findPassword(@Valid @RequestBody UserFindPasswordRequestDto userFindPasswordRequestDto) {
+ public void findPassword(@Valid @RequestBody
+ UserFindPasswordRequestDto userFindPasswordRequestDto) {
this.userService.findPassword(userFindPasswordRequestDto);
}
@@ -499,9 +512,10 @@ public void findPassword(@Valid @RequestBody UserFindPasswordRequestDto userFind
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "비밀번호 업데이트 API (완료)")
public UserResponseDto updatePassword(
- @Valid @RequestBody UserUpdatePasswordRequestDto userUpdatePasswordRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ UserUpdatePasswordRequestDto userUpdatePasswordRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.updatePassword(userDetails.getUser(), userUpdatePasswordRequestDto);
}
@@ -525,7 +539,8 @@ public UserResponseDto updatePassword(
@ApiResponse(responseCode = "4107", description = "접근 권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public UserResponseDto leave(@AuthenticationPrincipal CustomUserDetails userDetails) {
+ public UserResponseDto leave(@AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.leave(userDetails.getUser());
}
@@ -546,8 +561,10 @@ public UserResponseDto leave(@AuthenticationPrincipal CustomUserDetails userDeta
@ApiResponse(responseCode = "4107", description = "접근 권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
- public UserResponseDto delete(@PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails) {
+ public UserResponseDto delete(@PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.eraseUserData(userDetails.getUser(), id);
}
@@ -557,10 +574,12 @@ public UserResponseDto delete(@PathVariable("id") String id,
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "사용자 추방 및 사물함 반환 API (완료)")
public UserResponseDto drop(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody String dropReason
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody
+ String dropReason) {
return this.userService.dropUser(userDetails.getUser(), id, dropReason);
}
@@ -568,8 +587,8 @@ public UserResponseDto drop(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "사용자가 속한 동아리 목록 불러오기 API(완료)", description = "관리자, 학생회장인 경우 모든 동아리 불러오기")
public List getCircleList(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.getCircleList(userDetails.getUser());
}
@@ -578,9 +597,10 @@ public List getCircleList(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "가입 대기 사용자 정보 확인 API (완료)")
public UserAdmissionResponseDto findAdmissionById(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findAdmissionById(userDetails.getUser(), id);
}
@@ -589,10 +609,12 @@ public UserAdmissionResponseDto findAdmissionById(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "모든 가입 대기 사용자 목록 확인 API (완료)")
public Page findAllAdmissions(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @RequestParam(name = "name", required = false) String name,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @RequestParam(name = "name", required = false)
+ String name,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.findAllAdmissions(userDetails.getUser(), name, pageNum);
}
@@ -607,10 +629,12 @@ public Page findAllAdmissions(
@ApiResponse(responseCode = "4107", description = "이미 등록된 사용자 입니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserAdmissionResponseDto createAdmission(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "userAdmissionCreateRequestDto") @Valid UserAdmissionCreateRequestDto userAdmissionCreateRequestDto,
- @RequestPart(value = "userAdmissionAttachImageList") List userAdmissionAttachImageList
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "userAdmissionCreateRequestDto") @Valid
+ UserAdmissionCreateRequestDto userAdmissionCreateRequestDto,
+ @RequestPart(value = "userAdmissionAttachImageList")
+ List userAdmissionAttachImageList) {
return this.userService.createAdmission(userDetails.getUser(), userAdmissionCreateRequestDto,
userAdmissionAttachImageList);
}
@@ -619,8 +643,8 @@ public UserAdmissionResponseDto createAdmission(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "현재 사용자의 가입 신청 정보 확인 API")
public UserAdmissionResponseDto getCurrentUserAdmission(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.getCurrentUserAdmission(userDetails.getUser());
}
@@ -639,9 +663,10 @@ public UserAdmissionResponseDto getCurrentUserAdmission(
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json", schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = BadRequestException.class)))
})
public UserAdmissionResponseDto acceptAdmission(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.accept(userDetails.getUser(), id);
}
@@ -666,10 +691,12 @@ public UserAdmissionResponseDto acceptAdmission(
@ApiResponse(responseCode = "5000", description = "User id checked, but exception occurred", content = @io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json", schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = BadRequestException.class)))
})
public UserAdmissionResponseDto rejectAdmission(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody String rejectReason
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody
+ String rejectReason) {
return this.userService.reject(userDetails.getUser(), id, rejectReason);
}
@@ -679,9 +706,10 @@ public UserAdmissionResponseDto rejectAdmission(
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
@Operation(summary = "사용자 복구 API(완료)", description = "복구할 사용자의 id를 넣어주세요")
public UserResponseDto restore(
- @PathVariable("id") String id,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("id")
+ String id,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return this.userService.restore(userDetails.getUser(), id);
}
@@ -693,8 +721,8 @@ public UserResponseDto restore(
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserSignInResponseDto updateToken(
- @Valid @RequestBody UserUpdateTokenRequestDto userUpdateTokenRequestDto
- ) {
+ @Valid @RequestBody
+ UserUpdateTokenRequestDto userUpdateTokenRequestDto) {
return this.userService.updateToken(userUpdateTokenRequestDto.getRefreshToken());
}
@@ -705,9 +733,10 @@ public UserSignInResponseDto updateToken(
@ApiResponse(responseCode = "200", description = "OK", content = @io.swagger.v3.oas.annotations.media.Content(mediaType = "application/json", schema = @io.swagger.v3.oas.annotations.media.Schema(implementation = UserSignInResponseDto.class)))
})
public UserSignOutResponseDto signOut(
- @Valid @RequestBody UserSignOutRequestDto userSignOutRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ UserSignOutRequestDto userSignOutRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userService.signOut(userDetails.getUser(), userSignOutRequestDto);
}
@@ -723,8 +752,8 @@ public UserSignOutResponseDto signOut(
@ApiResponse(responseCode = "4000", description = "해당 사용자를 찾을 수 없습니다", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserFindIdResponseDto findUserId(
- @Valid @RequestBody UserFindIdRequestDto userFindIdRequestDto
- ) {
+ @Valid @RequestBody
+ UserFindIdRequestDto userFindIdRequestDto) {
return userService.findUserId(userFindIdRequestDto);
}
@@ -739,8 +768,8 @@ public UserFindIdResponseDto findUserId(
@ApiResponse(responseCode = "4107", description = "접근 권한이 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
})
public List findByStudentId(
- @PathVariable("studentId") String studentId
- ) {
+ @PathVariable("studentId")
+ String studentId) {
return userService.findByStudentId(studentId);
}
@@ -758,49 +787,46 @@ public void exportUserList(HttpServletResponse response) {
@PutMapping(value = "/update/isV2")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "사용자 isV2 칼럼 업데이트(v1->v2 DB 마이그레이션 전용)",
- description = "사용자 isV2 칼럼 업데이트(v1->v2 DB 마이그레이션 전용) API입니다. isV2를 true로 업데이트 합니다. 학부 인증과 학적 상태 인증이 모두 끝난 유저만 업데이트가 가능합니다.")
+ @Operation(summary = "사용자 isV2 칼럼 업데이트(v1->v2 DB 마이그레이션 전용)", description = "사용자 isV2 칼럼 업데이트(v1->v2 DB 마이그레이션 전용) API입니다. isV2를 true로 업데이트 합니다. 학부 인증과 학적 상태 인증이 모두 끝난 유저만 업데이트가 가능합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserResponseDto updateUserIsV2(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userService.updateUserIsV2(userDetails.getUser());
}
@PostMapping(value = "/fcm")
@ResponseStatus(value = HttpStatus.CREATED)
- @Operation(summary = "사용자 fcmToken 등록",
- description = "로그인한 사용자의 fcmToken을 등록합니다")
+ @Operation(summary = "사용자 fcmToken 등록", description = "로그인한 사용자의 fcmToken을 등록합니다")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserFcmTokenResponseDto registerFcmToken(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @Valid @RequestBody UserFcmCreateRequestDto userFcmCreateRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @Valid @RequestBody
+ UserFcmCreateRequestDto userFcmCreateRequestDto) {
return userService.registerFcmToken(userDetails.getUser(), userFcmCreateRequestDto);
}
@GetMapping(value = "/fcm")
@ResponseStatus(value = HttpStatus.OK)
- @Operation(summary = "사용자 fcmToken 조회",
- description = "로그인한 사용자의 fcmToken을 조회합니다")
+ @Operation(summary = "사용자 fcmToken 조회", description = "로그인한 사용자의 fcmToken을 조회합니다")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserResponseDto.class))),
@ApiResponse(responseCode = "4000", description = "로그인된 사용자를 찾을 수 없습니다.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "4012", description = "접근 권한이 없습니다. 다시 로그인 해주세요. 문제 반복시 관리자에게 문의해주세요.", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class)))
})
public UserFcmTokenResponseDto getFcmToken(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userService.getUserFcmToken(userDetails.getUser());
}
}
-
diff --git a/app-main/src/main/java/net/causw/app/main/api/UserCouncilFeeController.java b/app-main/src/main/java/net/causw/app/main/api/UserCouncilFeeController.java
index 86d559019..825e1658d 100644
--- a/app-main/src/main/java/net/causw/app/main/api/UserCouncilFeeController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/UserCouncilFeeController.java
@@ -17,13 +17,13 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
-import net.causw.app.main.domain.finance.usercouncilfee.service.UserCouncilFeeService;
import net.causw.app.main.api.dto.userCouncilFee.CreateUserCouncilFeeWithFakeUserRequestDto;
import net.causw.app.main.api.dto.userCouncilFee.CreateUserCouncilFeeWithUserRequestDto;
import net.causw.app.main.api.dto.userCouncilFee.CurrentUserCouncilFeeResponseDto;
import net.causw.app.main.api.dto.userCouncilFee.UserCouncilFeeListResponseDto;
import net.causw.app.main.api.dto.userCouncilFee.UserCouncilFeeResponseDto;
+import net.causw.app.main.domain.finance.usercouncilfee.service.UserCouncilFeeService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.constant.MessageUtil;
import net.causw.global.exception.BadRequestException;
import net.causw.global.exception.InternalServerException;
@@ -49,56 +49,51 @@ public class UserCouncilFeeController {
@GetMapping("/export/excel")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 엑셀 다운로드",
- description = "학생회비 엑셀 파일을 다운로드합니다.")
+ @Operation(summary = "학생회비 엑셀 다운로드", description = "학생회비 엑셀 파일을 다운로드합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "5000", description = MessageUtil.FAIL_TO_GENERATE_EXCEL_FILE, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void exportUserCouncilFeeToExcel(
- HttpServletResponse response
- ) {
+ HttpServletResponse response) {
userCouncilFeeService.exportUserCouncilFeeToExcel(response);
}
@GetMapping("/list")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 목록 조회",
- description = "학생회비 납부자 목록을 조회합니다.")
+ @Operation(summary = "학생회비 납부자 목록 조회", description = "학생회비 납부자 목록을 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Page.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public Page getUserCouncilFeeList(
- @ParameterObject Pageable pageable
- ) {
+ @ParameterObject
+ Pageable pageable) {
return userCouncilFeeService.getUserCouncilFeeList(pageable);
}
@GetMapping("/info/{userCouncilFeeId}")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 상세 조회",
- description = "학생회비 납부자 상세 정보를 조회합니다.")
+ @Operation(summary = "학생회비 납부자 상세 조회", description = "학생회비 납부자 상세 정보를 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = UserCouncilFeeResponseDto.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_COUNCIL_FEE_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public UserCouncilFeeResponseDto getUserCouncilFeeInfo(
- @PathVariable(value = "userCouncilFeeId") String userCouncilFeeId
- ) {
+ @PathVariable(value = "userCouncilFeeId")
+ String userCouncilFeeId) {
return userCouncilFeeService.getUserCouncilFeeInfo(userCouncilFeeId);
}
@PostMapping("/create-user")
@ResponseStatus(HttpStatus.CREATED)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 등록(가입 유저 대상)",
- description = "동문네트워크 가입자 대상으로 학생회비 납부자를 등록합니다.")
+ @Operation(summary = "학생회비 납부자 등록(가입 유저 대상)", description = "동문네트워크 가입자 대상으로 학생회비 납부자를 등록합니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "학생회비 납부자 등록 완료", content = @Content),
@ApiResponse(responseCode = "4000", description = MessageUtil.INVALID_USER_COUNCIL_FEE_INFO, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -108,9 +103,10 @@ public UserCouncilFeeResponseDto getUserCouncilFeeInfo(
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void createUserCouncilFeeWithUser(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid CreateUserCouncilFeeWithUserRequestDto createUserCouncilFeeWithUserRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ CreateUserCouncilFeeWithUserRequestDto createUserCouncilFeeWithUserRequestDto) {
userCouncilFeeService.createUserCouncilFeeWithUser(userDetails.getUser(),
createUserCouncilFeeWithUserRequestDto);
}
@@ -118,8 +114,7 @@ public void createUserCouncilFeeWithUser(
@PostMapping("/create-fake-user")
@ResponseStatus(HttpStatus.CREATED)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 등록(미가입자 대상)",
- description = "동문네트워크 미 가입자 대상으로 학생회비 납부자를 등록합니다.")
+ @Operation(summary = "학생회비 납부자 등록(미가입자 대상)", description = "동문네트워크 미 가입자 대상으로 학생회비 납부자를 등록합니다.")
@ApiResponses({
@ApiResponse(responseCode = "201", description = "학생회비 납부자 등록 완료", content = @Content),
@ApiResponse(responseCode = "4000", description = MessageUtil.INVALID_USER_COUNCIL_FEE_INFO, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -129,17 +124,17 @@ public void createUserCouncilFeeWithUser(
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void createUserCouncilFeeWithFakeUser(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestBody @Valid CreateUserCouncilFeeWithFakeUserRequestDto createUserCouncilFeeRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestBody @Valid
+ CreateUserCouncilFeeWithFakeUserRequestDto createUserCouncilFeeRequestDto) {
userCouncilFeeService.creatUserCouncilFeeWithFakeUser(userDetails.getUser(), createUserCouncilFeeRequestDto);
}
@PutMapping("/update-user")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 수정(가입 유저 대상)",
- description = "학생회비 납부자를 수정합니다.(가입 유저 대상)")
+ @Operation(summary = "학생회비 납부자 수정(가입 유저 대상)", description = "학생회비 납부자를 수정합니다.(가입 유저 대상)")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "학생회비 납부자 수정 완료", content = @Content),
@ApiResponse(responseCode = "4000", description = MessageUtil.INVALID_USER_COUNCIL_FEE_INFO, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -149,14 +144,12 @@ public void createUserCouncilFeeWithFakeUser(
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void updateUserCouncilFeeWithUser(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestHeader @Pattern(
- regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
- message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다."
- )
- @NotBlank(message = "대상 사용자 고유 id 값은 필수 입력 값입니다.") String userCouncilFeeId,
- @RequestBody @Valid CreateUserCouncilFeeWithUserRequestDto createUserCouncilFeeWithUserRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestHeader @Pattern(regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다.") @NotBlank(message = "대상 사용자 고유 id 값은 필수 입력 값입니다.")
+ String userCouncilFeeId,
+ @RequestBody @Valid
+ CreateUserCouncilFeeWithUserRequestDto createUserCouncilFeeWithUserRequestDto) {
userCouncilFeeService.updateUserCouncilFeeWithUser(userDetails.getUser(), userCouncilFeeId,
createUserCouncilFeeWithUserRequestDto);
}
@@ -164,8 +157,7 @@ public void updateUserCouncilFeeWithUser(
@PutMapping("/update-fake-user")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 수정(미가입자 대상)",
- description = "학생회비 납부자를 수정합니다.")
+ @Operation(summary = "학생회비 납부자 수정(미가입자 대상)", description = "학생회비 납부자를 수정합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "학생회비 납부자 수정 완료", content = @Content),
@ApiResponse(responseCode = "4000", description = MessageUtil.INVALID_USER_COUNCIL_FEE_INFO, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@@ -175,14 +167,12 @@ public void updateUserCouncilFeeWithUser(
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void updateUserCouncilFeeWithFakeUser(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestHeader @Pattern(
- regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
- message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다."
- )
- @NotBlank(message = "대상 사용자 고유 id 값은 필수 입력 값입니다.") String userCouncilFeeId,
- @RequestBody @Valid CreateUserCouncilFeeWithFakeUserRequestDto createUserCouncilFeeRequestDto
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestHeader @Pattern(regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다.") @NotBlank(message = "대상 사용자 고유 id 값은 필수 입력 값입니다.")
+ String userCouncilFeeId,
+ @RequestBody @Valid
+ CreateUserCouncilFeeWithFakeUserRequestDto createUserCouncilFeeRequestDto) {
userCouncilFeeService.updateUserCouncilFeeWithFakeUser(userDetails.getUser(), userCouncilFeeId,
createUserCouncilFeeRequestDto);
}
@@ -190,79 +180,75 @@ public void updateUserCouncilFeeWithFakeUser(
@DeleteMapping("/delete")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학생회비 납부자 삭제",
- description = "학생회비 납부자를 삭제합니다.")
+ @Operation(summary = "학생회비 납부자 삭제", description = "학생회비 납부자를 삭제합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "학생회비 납부자 삭제 완료", content = @Content),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_COUNCIL_FEE_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public void deleteUserCouncilFee(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestHeader String userCouncilFeeId
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestHeader
+ String userCouncilFeeId) {
userCouncilFeeService.deleteUserCouncilFee(userDetails.getUser(), userCouncilFeeId);
}
@GetMapping("/getUserIdByStudentId")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "학번으로 사용자 id 조회",
- description = "학번으로 사용자 id를 조회합니다.")
+ @Operation(summary = "학번으로 사용자 id 조회", description = "학번으로 사용자 id를 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "사용자 ID 조회 완료", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public String getUserIdByStudentId(
- @RequestHeader String studentId
- ) {
+ @RequestHeader
+ String studentId) {
return userCouncilFeeService.getUserIdByStudentId(studentId);
}
@GetMapping("/isCurrentSemesterApplied")
@ResponseStatus(HttpStatus.OK)
@PreAuthorize("@security.hasRoleGroup(@RoleGroup.EXECUTIVES)")
- @Operation(summary = "특정 사용자가 현재 학생회비 적용 학기인지 여부 조회",
- description = "특정 사용자가 현재 학생회비 적용 학기인지 여부를 조회합니다.")
+ @Operation(summary = "특정 사용자가 현재 학생회비 적용 학기인지 여부 조회", description = "특정 사용자가 현재 학생회비 적용 학기인지 여부를 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public Boolean isCurrentSemesterApplied(
- @RequestHeader String userId
- ) {
+ @RequestHeader
+ String userId) {
return userCouncilFeeService.isCurrentSemesterApplied(userId);
}
@GetMapping("/isCurrentSemesterApplied/self")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "본인이 현재 학생회비 적용 학기인지 여부 조회",
- description = "본인이 현재 학생회비 적용 학기인지 여부를 조회합니다.")
+ @Operation(summary = "본인이 현재 학생회비 적용 학기인지 여부 조회", description = "본인이 현재 학생회비 적용 학기인지 여부를 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public Boolean isCurrentSemesterAppliedBySelf(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userCouncilFeeService.isCurrentSemesterAppliedBySelf(userDetails.getUser());
}
@GetMapping("/isCurrentSemesterApplied/self/info")
@ResponseStatus(HttpStatus.OK)
- @Operation(summary = "본인이 현재 학생회비 적용 학기인지 여부 상세 조회",
- description = "본인이 현재 학생회비 적용 학기인지 여부를 상세 조회합니다.")
+ @Operation(summary = "본인이 현재 학생회비 적용 학기인지 여부 상세 조회", description = "본인이 현재 학생회비 적용 학기인지 여부를 상세 조회합니다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = CurrentUserCouncilFeeResponseDto.class))),
@ApiResponse(responseCode = "4000", description = MessageUtil.USER_NOT_FOUND, content = @Content(mediaType = "application/json", schema = @Schema(implementation = BadRequestException.class))),
@ApiResponse(responseCode = "5000", description = MessageUtil.INTERNAL_SERVER_ERROR, content = @Content(mediaType = "application/json", schema = @Schema(implementation = InternalServerException.class)))
})
public CurrentUserCouncilFeeResponseDto isCurrentSemesterAppliedBySelfInfo(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return userCouncilFeeService.isCurrentSemesterAppliedBySelfInfo(userDetails.getUser());
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/UserInfoController.java b/app-main/src/main/java/net/causw/app/main/api/UserInfoController.java
index 1db96dd07..8f6dab6f1 100644
--- a/app-main/src/main/java/net/causw/app/main/api/UserInfoController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/UserInfoController.java
@@ -15,7 +15,6 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.userInfo.UserInfoResponseDto;
import net.causw.app.main.api.dto.userInfo.UserInfoSearchConditionDto;
import net.causw.app.main.api.dto.userInfo.UserInfoSummaryResponseDto;
@@ -23,6 +22,7 @@
import net.causw.app.main.domain.user.account.service.GetUserInfoUseCaseService;
import net.causw.app.main.domain.user.account.service.SearchUserInfoListUseCaseService;
import net.causw.app.main.domain.user.account.service.UpdateUserInfoUseCaseService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.global.exception.BadRequestException;
import io.swagger.v3.oas.annotations.Operation;
@@ -51,8 +51,8 @@ public class UserInfoController {
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "사용자 id로 사용자 세부정보 조회 API")
public UserInfoResponseDto getUserInfoByUserId(
- @PathVariable("userId") String userId
- ) {
+ @PathVariable("userId")
+ String userId) {
return getUserInfoUseCaseService.execute(userId);
}
@@ -60,9 +60,10 @@ public UserInfoResponseDto getUserInfoByUserId(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "전체 사용자 리스트 검색 및 조회 API", description = "최근 수정된 순서대로 정렬")
public Page searchUserInfos(
- @RequestParam(name = "pageNum", defaultValue = "0") Integer pageNum,
- @ModelAttribute UserInfoSearchConditionDto userInfoSearchCondition
- ) {
+ @RequestParam(name = "pageNum", defaultValue = "0")
+ Integer pageNum,
+ @ModelAttribute
+ UserInfoSearchConditionDto userInfoSearchCondition) {
return searchUserInfoListUseCaseService.execute(userInfoSearchCondition, pageNum);
}
@@ -70,8 +71,8 @@ public Page searchUserInfos(
@ResponseStatus(value = HttpStatus.OK)
@Operation(summary = "자신의 세부정보 조회 API")
public UserInfoResponseDto getCurrentUser(
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return getUserInfoUseCaseService.execute(userDetails.getUserId());
}
@@ -85,10 +86,12 @@ public UserInfoResponseDto getCurrentUser(
})
public UserInfoResponseDto updateCurrentUser(
- @AuthenticationPrincipal CustomUserDetails userDetails,
- @RequestPart(value = "userInfoUpdateDto") @Valid UserInfoUpdateRequestDto userInfoUpdateDto,
- @RequestPart(value = "profileImage", required = false) MultipartFile profileImage
- ) {
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails,
+ @RequestPart(value = "userInfoUpdateDto") @Valid
+ UserInfoUpdateRequestDto userInfoUpdateDto,
+ @RequestPart(value = "profileImage", required = false)
+ MultipartFile profileImage) {
return updateUserInfoUseCaseService.execute(userDetails.getUserId(), userInfoUpdateDto, profileImage);
}
}
\ No newline at end of file
diff --git a/app-main/src/main/java/net/causw/app/main/api/VoteController.java b/app-main/src/main/java/net/causw/app/main/api/VoteController.java
index 1192db9ea..e5ff1b1e0 100644
--- a/app-main/src/main/java/net/causw/app/main/api/VoteController.java
+++ b/app-main/src/main/java/net/causw/app/main/api/VoteController.java
@@ -11,11 +11,11 @@
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
-import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import net.causw.app.main.api.dto.vote.CastVoteRequestDto;
import net.causw.app.main.api.dto.vote.CreateVoteRequestDto;
import net.causw.app.main.api.dto.vote.VoteResponseDto;
import net.causw.app.main.domain.community.vote.service.VoteService;
+import net.causw.app.main.domain.user.auth.userdetails.CustomUserDetails;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
@@ -32,9 +32,10 @@ public class VoteController {
@ResponseStatus(HttpStatus.CREATED)
@Operation(summary = "투표 생성", description = "새로운 투표를 생성합니다.")
public ResponseEntity createVote(
- @Valid @RequestBody CreateVoteRequestDto createVoteRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ CreateVoteRequestDto createVoteRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
VoteResponseDto voteResponse = voteService.createVote(createVoteRequestDto, userDetails.getUser());
return ResponseEntity.status(HttpStatus.CREATED).body(voteResponse);
}
@@ -43,9 +44,10 @@ public ResponseEntity createVote(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "투표 참여", description = "해당 투표에 참여합니다.")
public ResponseEntity castVote(
- @Valid @RequestBody CastVoteRequestDto castVoteRequestDto,
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @Valid @RequestBody
+ CastVoteRequestDto castVoteRequestDto,
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
String result = voteService.castVote(castVoteRequestDto, userDetails.getUser());
return ResponseEntity.ok(result);
}
@@ -54,9 +56,10 @@ public ResponseEntity castVote(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "투표 종료", description = "특정 투표를 종료합니다.")
public ResponseEntity endVote(
- @PathVariable("voteId") String voteId, // 파라미터 이름 명시
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("voteId")
+ String voteId, // 파라미터 이름 명시
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return ResponseEntity.ok(voteService.endVote(voteId, userDetails.getUser()));
}
@@ -64,9 +67,10 @@ public ResponseEntity endVote(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "투표 재시작", description = "특정 투표를 재시작합니다.")
public ResponseEntity restartVote(
- @PathVariable("voteId") String voteId, // 파라미터 이름 명시
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("voteId")
+ String voteId, // 파라미터 이름 명시
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
return ResponseEntity.ok(voteService.restartVote(voteId, userDetails.getUser()));
}
@@ -74,9 +78,10 @@ public ResponseEntity restartVote(
@ResponseStatus(HttpStatus.OK)
@Operation(summary = "투표 조회", description = "특정 투표에 대한 정보를 조회합니다.")
public ResponseEntity getVoteById(
- @PathVariable("voteId") String voteId, // 파라미터 이름 명시
- @AuthenticationPrincipal CustomUserDetails userDetails
- ) {
+ @PathVariable("voteId")
+ String voteId, // 파라미터 이름 명시
+ @AuthenticationPrincipal
+ CustomUserDetails userDetails) {
VoteResponseDto voteResponse = voteService.getVoteById(voteId, userDetails.getUser());
return ResponseEntity.ok(voteResponse);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleBoardsResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleBoardsResponseDto.java
index a2079e916..b2aeff190 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleBoardsResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleBoardsResponseDto.java
@@ -24,8 +24,7 @@ public class CircleBoardsResponseDto {
public static CircleBoardsResponseDto from(
CircleResponseDto circle,
- List boardList
- ) {
+ List boardList) {
return CircleBoardsResponseDto.builder()
.circle(circle)
.boardList(boardList)
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleCreateRequestDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleCreateRequestDto.java
index 5d48393e3..badfc7f22 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleCreateRequestDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/circle/CircleCreateRequestDto.java
@@ -24,10 +24,7 @@ public class CircleCreateRequestDto {
@Schema(description = "동아리 설명", example = "ICT위원회는 동문 네트워크 서비스를 만드는 특별기구이자 동아리입니다.")
private String description;
- @Pattern(
- regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
- message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다."
- )
+ @Pattern(regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다.")
@NotBlank(message = "동아리장 id를 입력해 주세요.")
private String leaderId;
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/exception/ConstraintExceptionDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/exception/ConstraintExceptionDto.java
index 49fe2eaee..0b9bbaf48 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/exception/ConstraintExceptionDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/exception/ConstraintExceptionDto.java
@@ -23,8 +23,8 @@ public class ConstraintExceptionDto {
public static ConstraintExceptionDto of(ErrorCode errorCode, String message,
ConstraintViolationException exception) {
List errors = new ArrayList<>();
- exception.getConstraintViolations().forEach(violation ->
- errors.add(violation.getRootBeanClass().getName() + " " +
+ exception.getConstraintViolations()
+ .forEach(violation -> errors.add(violation.getRootBeanClass().getName() + " " +
violation.getPropertyPath() + ": " + violation.getMessage()));
return ConstraintExceptionDto.builder()
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/form/request/create/FormCreateRequestDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/form/request/create/FormCreateRequestDto.java
index 129d53302..faa85abe6 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/form/request/create/FormCreateRequestDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/form/request/create/FormCreateRequestDto.java
@@ -23,9 +23,7 @@ public class FormCreateRequestDto {
@Schema(description = "재학생 답변 허용 여부", example = "ture", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isAllowedEnrolled;
- @Schema(description = "재학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지 넣어서 요청)",
- example = "[FIRST_SEMESTER,SECOND_SEMESTER,THIRD_SEMESTER,FORTH_SEMESTER,FIFTH_SEMESTER,SIXTH_SEMESTER,SEVENTH_SEMESTER,EIGHTH_SEMESTER,ABOVE_NINTH_SEMESTER]",
- requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Schema(description = "재학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지 넣어서 요청)", example = "[FIRST_SEMESTER,SECOND_SEMESTER,THIRD_SEMESTER,FORTH_SEMESTER,FIFTH_SEMESTER,SIXTH_SEMESTER,SEVENTH_SEMESTER,EIGHTH_SEMESTER,ABOVE_NINTH_SEMESTER]", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private List enrolledRegisteredSemesterList;
@Schema(description = "재학생 답변 허용 시, 학생회비 납부 필요 여부(isAllowedEnrolled가 true일 때 null이면 안 됩니다)", example = "ture", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@@ -35,9 +33,7 @@ public class FormCreateRequestDto {
@Schema(description = "휴학생 답변 허용 여부", example = "ture", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isAllowedLeaveOfAbsence;
- @Schema(description = "휴학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지 넣어서 요청)",
- example = "[FIRST_SEMESTER,SECOND_SEMESTER,THIRD_SEMESTER,FORTH_SEMESTER,FIFTH_SEMESTER,SIXTH_SEMESTER,SEVENTH_SEMESTER,EIGHTH_SEMESTER,ABOVE_NINTH_SEMESTER]",
- requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @Schema(description = "휴학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지 넣어서 요청)", example = "[FIRST_SEMESTER,SECOND_SEMESTER,THIRD_SEMESTER,FORTH_SEMESTER,FIFTH_SEMESTER,SIXTH_SEMESTER,SEVENTH_SEMESTER,EIGHTH_SEMESTER,ABOVE_NINTH_SEMESTER]", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
private List leaveOfAbsenceRegisteredSemesterList;
@Schema(description = "졸업생 답변 허용 여부", example = "ture", requiredMode = Schema.RequiredMode.REQUIRED)
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/form/response/FormResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/form/response/FormResponseDto.java
index 496423bf4..a327038ea 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/form/response/FormResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/form/response/FormResponseDto.java
@@ -29,8 +29,7 @@ public class FormResponseDto {
@Schema(description = "재학생 답변 허용 여부", example = "true")
private Boolean isAllowedEnrolled;
- @Schema(description = "재학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지)",
- example = "[FIRST_SEMESTER,SECOND_SEMESTER ... EIGHTH_SEMESTER,ABOVE_NIGHT_SEMESTER]")
+ @Schema(description = "재학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지)", example = "[FIRST_SEMESTER,SECOND_SEMESTER ... EIGHTH_SEMESTER,ABOVE_NIGHT_SEMESTER]")
private List enrolledRegisteredSemesterList;
@Schema(description = "재학생 답변 허용 시, 학생회비 납부 필요 여부", example = "ture")
@@ -40,8 +39,7 @@ public class FormResponseDto {
@Schema(description = "휴학생 답변 허용 여부", example = "ture")
private Boolean isAllowedLeaveOfAbsence;
- @Schema(description = "휴학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지)",
- example = "[FIRST_SEMESTER,SECOND_SEMESTER ... EIGHTH_SEMESTER,ABOVE_NIGHT_SEMESTER]")
+ @Schema(description = "휴학생 답변 허용 시, 답변 가능한 등록 완료 학기(상관없음 시 1차부터 9차 이상까지)", example = "[FIRST_SEMESTER,SECOND_SEMESTER ... EIGHTH_SEMESTER,ABOVE_NIGHT_SEMESTER]")
private List leaveOfAbsenceRegisteredSemesterList;
@Schema(description = "졸업생 답변 허용 여부", example = "ture")
@@ -56,12 +54,12 @@ public static FormResponseDto empty() {
.title("")
.isClosed(false)
.isAllowedEnrolled(false)
- .enrolledRegisteredSemesterList(List.of()) // 빈 리스트
- .isNeedCouncilFeePaid(false) // 기본값 false
- .isAllowedLeaveOfAbsence(false) // 기본값 false
- .leaveOfAbsenceRegisteredSemesterList(List.of()) // 빈 리스트
- .isAllowedGraduation(false) // 기본값 false
- .questionResponseDtoList(List.of()) // 빈 리스트
+ .enrolledRegisteredSemesterList(List.of()) // 빈 리스트
+ .isNeedCouncilFeePaid(false) // 기본값 false
+ .isAllowedLeaveOfAbsence(false) // 기본값 false
+ .leaveOfAbsenceRegisteredSemesterList(List.of()) // 빈 리스트
+ .isAllowedGraduation(false) // 기본값 false
+ .questionResponseDtoList(List.of()) // 빈 리스트
.build();
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/homepage/HomePageResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/homepage/HomePageResponseDto.java
index cd44fcc9c..5195bd2fc 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/homepage/HomePageResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/homepage/HomePageResponseDto.java
@@ -18,8 +18,7 @@ public class HomePageResponseDto {
public static HomePageResponseDto of(
BoardResponseDto board,
- Page posts
- ) {
+ Page posts) {
return HomePageResponseDto.builder()
.board(board)
.posts(posts)
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationResponseDto.java
index e7156a0f8..5b9cfb7c3 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationResponseDto.java
@@ -18,8 +18,7 @@ public class LockerLocationResponseDto {
public static LockerLocationResponseDto of(
LockerLocation lockerLocation,
Long enableLockerCount,
- Long totalLockerCount
- ) {
+ Long totalLockerCount) {
return LockerLocationResponseDto.builder()
.id(lockerLocation.getId())
.name(lockerLocation.getName())
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationsResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationsResponseDto.java
index 0c4afe421..7a76e0f90 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationsResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerLocationsResponseDto.java
@@ -15,8 +15,7 @@ public class LockerLocationsResponseDto {
public static LockerLocationsResponseDto of(
List lockerLocations,
- LockerResponseDto myLocker
- ) {
+ LockerResponseDto myLocker) {
return LockerLocationsResponseDto.builder()
.lockerLocations(lockerLocations)
.myLocker(myLocker)
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerResponseDto.java
index 0b022e19b..f03824acd 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/locker/LockerResponseDto.java
@@ -37,8 +37,7 @@ public static LockerResponseDto of(Locker locker, User user) {
public static LockerResponseDto of(
Locker locker,
User user,
- String locationName
- ) {
+ String locationName) {
String location = locationName + " " + locker.getLockerNumber();
return LockerResponseDto.builder()
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/notification/BoardNotificationDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/notification/BoardNotificationDto.java
index 7bf803241..b4cb99947 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/notification/BoardNotificationDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/notification/BoardNotificationDto.java
@@ -15,8 +15,7 @@ public class BoardNotificationDto {
public static BoardNotificationDto of(Board board, Post post) {
return BoardNotificationDto.builder()
.title(String.format("%s",
- board.getName()
- ))
+ board.getName()))
.body(String.format("새 게시글 : %s",
post.getTitle()))
.build();
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/notification/CeremonyListNotificationDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/notification/CeremonyListNotificationDto.java
index f6438ca2c..7fb1edf62 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/notification/CeremonyListNotificationDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/notification/CeremonyListNotificationDto.java
@@ -7,9 +7,9 @@
@Builder
public class CeremonyListNotificationDto {
private String id;
- private String writer; // 이름(학번)
- private String category; // 경조사 종류
- private String date; // 20xx.0x.0x ~ 20xx.0x.0x
+ private String writer; // 이름(학번)
+ private String category; // 경조사 종류
+ private String date; // 20xx.0x.0x ~ 20xx.0x.0x
private String description; // 설명
- private String createdAt; // 알림 신청일
+ private String createdAt; // 알림 신청일
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/notification/CommentNotificationDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/notification/CommentNotificationDto.java
index 59948ac97..871533ccb 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/notification/CommentNotificationDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/notification/CommentNotificationDto.java
@@ -15,8 +15,7 @@ public class CommentNotificationDto {
public static CommentNotificationDto of(Comment comment, ChildComment childComment) {
return CommentNotificationDto.builder()
.title(String.format("%s",
- comment.getContent()
- ))
+ comment.getContent()))
.body(String.format("새 대댓글 : %s",
childComment.getContent()))
.build();
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/notification/NotificationCountResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/notification/NotificationCountResponseDto.java
index 2e39ad145..bb6d872fe 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/notification/NotificationCountResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/notification/NotificationCountResponseDto.java
@@ -14,4 +14,3 @@ public class NotificationCountResponseDto {
@Schema(description = "읽지 않은 알림 개수", example = "1, 2, 3,...")
private Integer notificationLogCount;
}
-
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/notification/PostNotificationDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/notification/PostNotificationDto.java
index e052e069a..3eeeacba9 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/notification/PostNotificationDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/notification/PostNotificationDto.java
@@ -15,8 +15,7 @@ public class PostNotificationDto {
public static PostNotificationDto of(Post post, Comment comment) {
return PostNotificationDto.builder()
.title(String.format("%s",
- post.getTitle()
- ))
+ post.getTitle()))
.body(String.format("새 댓글 : %s",
comment.getContent()))
.build();
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/post/PostCreateResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/post/PostCreateResponseDto.java
index 8fe63f95f..246823423 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/post/PostCreateResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/post/PostCreateResponseDto.java
@@ -12,7 +12,3 @@ public class PostCreateResponseDto {
private String id;
}
-
-
-
-
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserCommand.java b/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserCommand.java
index 9bab2253d..aa255ddd3 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserCommand.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserCommand.java
@@ -10,6 +10,5 @@ public record GraduatedUserCommand(
Integer graduationYear,
String nickname,
Department department,
- String phoneNumber
-) {
+ String phoneNumber) {
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserRegisterRequestDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserRegisterRequestDto.java
index 68d5099f5..199721d51 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserRegisterRequestDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/user/GraduatedUserRegisterRequestDto.java
@@ -20,22 +20,19 @@ public record GraduatedUserRegisterRequestDto(
@NotNull
Integer graduationYear,
- @Email
- @NotBlank
+ @Email @NotBlank
String email,
@NotBlank
String password,
- @NotBlank
- @Pattern(regexp = "^01(?:0|1|[6-9])-(\\d{3}|\\d{4})-\\d{4}$", message = "전화번호 형식에 맞지 않습니다.")
+ @NotBlank @Pattern(regexp = "^01(?:0|1|[6-9])-(\\d{3}|\\d{4})-\\d{4}$", message = "전화번호 형식에 맞지 않습니다.")
String phoneNumber,
@NotNull
Department department,
- String studentId
-) {
+ String studentId) {
public GraduatedUserCommand toGraduatedUserCommand() {
return new GraduatedUserCommand(
this.email,
@@ -45,7 +42,6 @@ public GraduatedUserCommand toGraduatedUserCommand() {
this.graduationYear,
this.nickname,
this.department,
- this.phoneNumber
- );
+ this.phoneNumber);
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/user/UserCreateRequestDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/user/UserCreateRequestDto.java
index f609387dd..deb77bcd0 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/user/UserCreateRequestDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/user/UserCreateRequestDto.java
@@ -30,10 +30,7 @@ public class UserCreateRequestDto {
private String name;
@NotBlank(message = "비밀번호를 입력해 주세요.")
- @Pattern(
- regexp = "^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*()-_?]).{8,20}$",
- message = "비밀번호는 8자 이상 20자 이하이며, 영문, 숫자, 특수문자가 각 1개 이상 포함되어야 합니다."
- )
+ @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[!@#$%^&*()-_?]).{8,20}$", message = "비밀번호는 8자 이상 20자 이하이며, 영문, 숫자, 특수문자가 각 1개 이상 포함되어야 합니다.")
@Schema(description = "비밀번호", example = "password00!!")
private String password;
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/userAcademicRecordApplication/UpdateUserAcademicRecordApplicationRequestDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/userAcademicRecordApplication/UpdateUserAcademicRecordApplicationRequestDto.java
index bc8379a86..d565a9452 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/userAcademicRecordApplication/UpdateUserAcademicRecordApplicationRequestDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/userAcademicRecordApplication/UpdateUserAcademicRecordApplicationRequestDto.java
@@ -11,10 +11,7 @@
public class UpdateUserAcademicRecordApplicationRequestDto {
@Schema(description = "변경 목표 학적 정보 신청 고유 id 값", requiredMode = Schema.RequiredMode.REQUIRED, example = "uuid 형식의 String 값입니다.")
- @Pattern(
- regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
- message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다."
- )
+ @Pattern(regexp = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", message = "id 값은 대시(-)를 포함하고, 32자리의 UUID 형식이어야 합니다.")
@NotBlank(message = "변경 목표 학적 정보 신청 고유 id 값은 필수 입력 값입니다.")
private String applicationId;
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByChildCommentResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByChildCommentResponseDto.java
index 2a66b25af..255b06772 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByChildCommentResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByChildCommentResponseDto.java
@@ -1,6 +1,5 @@
package net.causw.app.main.api.dto.userBlock.response;
public record CreateBlockByChildCommentResponseDto(
- String message
-) {
+ String message) {
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByCommentResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByCommentResponseDto.java
index cc1ab9308..cded1c48a 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByCommentResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByCommentResponseDto.java
@@ -1,6 +1,5 @@
package net.causw.app.main.api.dto.userBlock.response;
public record CreateBlockByCommentResponseDto(
- String message
-) {
+ String message) {
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByPostResponseDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByPostResponseDto.java
index 0cd0aa341..ca38a6729 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByPostResponseDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/userBlock/response/CreateBlockByPostResponseDto.java
@@ -1,6 +1,5 @@
package net.causw.app.main.api.dto.userBlock.response;
public record CreateBlockByPostResponseDto(
- String message
-) {
+ String message) {
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/userInfo/UserInfoSearchConditionDto.java b/app-main/src/main/java/net/causw/app/main/api/dto/userInfo/UserInfoSearchConditionDto.java
index 070508197..1db79ed33 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/userInfo/UserInfoSearchConditionDto.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/userInfo/UserInfoSearchConditionDto.java
@@ -15,6 +15,5 @@ public record UserInfoSearchConditionDto(
@Schema(description = "입학 년도 검색 구간 상방", example = "2020")
Integer admissionYearEnd,
@Schema(description = "학적 상태(ENROLLED, LEAVE_OF_ABSENCE, GRADUATED, 그외 등등)", example = "ENROLLED")
- List academicStatus
-) {
+ List academicStatus) {
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/BoardDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/BoardDtoMapper.java
index b88d31c0f..9a5131805 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/BoardDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/BoardDtoMapper.java
@@ -14,11 +14,11 @@
import net.causw.app.main.api.dto.board.BoardResponseDto;
import net.causw.app.main.api.dto.board.BoardSubscribeResponseDto;
import net.causw.app.main.api.dto.circle.CircleResponseDto;
+import net.causw.app.main.api.dto.post.PostContentDto;
+import net.causw.app.main.api.dto.user.UserResponseDto;
import net.causw.app.main.domain.community.board.entity.Board;
import net.causw.app.main.domain.community.board.entity.BoardApply;
import net.causw.app.main.domain.community.post.entity.Post;
-import net.causw.app.main.api.dto.post.PostContentDto;
-import net.causw.app.main.api.dto.user.UserResponseDto;
import net.causw.app.main.domain.notification.notification.entity.UserBoardSubscribe;
@Mapper(componentModel = "spring")
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CeremonyDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CeremonyDtoMapper.java
index 9e80f9acc..1735fe74e 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CeremonyDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CeremonyDtoMapper.java
@@ -31,7 +31,7 @@ public interface CeremonyDtoMapper {
@Mapping(target = "applicantStudentId", source = "user.studentId")
@Mapping(target = "applicantName", source = "user.name")
@Mapping(target = "title", source = ".", qualifiedByName = "mapTitle")
- @Mapping(target = "isSetAll", ignore = true) // general에서는 숨김
+ @Mapping(target = "isSetAll", ignore = true) // general에서는 숨김
@Mapping(target = "targetAdmissionYears", ignore = true)
// general에서는 숨김
CeremonyResponseDto toCeremonyResponseDto(Ceremony ceremony);
@@ -48,7 +48,7 @@ public interface CeremonyDtoMapper {
@Mapping(target = "applicantStudentId", source = "user.studentId")
@Mapping(target = "applicantName", source = "user.name")
@Mapping(target = "title", source = ".", qualifiedByName = "mapTitle")
- @Mapping(target = "isSetAll", source = "ceremony.setAll") // 상세 조회에서는 표시
+ @Mapping(target = "isSetAll", source = "ceremony.setAll") // 상세 조회에서는 표시
@Mapping(target = "targetAdmissionYears", source = "targetAdmissionYears")
// 상세 조회에서는 표시
CeremonyResponseDto toDetailedCeremonyResponseDto(Ceremony ceremony);
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CircleDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CircleDtoMapper.java
index 4cc7b8d6a..3c1d375b9 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CircleDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CircleDtoMapper.java
@@ -18,13 +18,13 @@
import net.causw.app.main.api.dto.circle.CirclesResponseDto;
import net.causw.app.main.api.dto.circle.ExportCircleMemberToExcelResponseDto;
import net.causw.app.main.api.dto.duplicate.DuplicatedCheckResponseDto;
+import net.causw.app.main.api.dto.user.UserResponseDto;
import net.causw.app.main.api.dto.util.dtoMapper.custom.UuidFileToUrlDtoMapper;
+import net.causw.app.main.domain.campus.circle.entity.Circle;
+import net.causw.app.main.domain.campus.circle.entity.CircleMember;
import net.causw.app.main.domain.community.board.entity.Board;
import net.causw.app.main.domain.community.post.entity.Post;
import net.causw.app.main.domain.finance.usercouncilfee.entity.UserCouncilFee;
-import net.causw.app.main.api.dto.user.UserResponseDto;
-import net.causw.app.main.domain.campus.circle.entity.Circle;
-import net.causw.app.main.domain.campus.circle.entity.CircleMember;
import net.causw.app.main.domain.user.account.entity.user.User;
// Custom Annotation을 사용하여 중복되는 @Mapping을 줄일 수 있습니다.
@@ -32,8 +32,7 @@
@Target({ElementType.METHOD})
@Mapping(target = "leaderId", expression = "java(circle.getLeader().map(User::getId).orElse(null))")
@Mapping(target = "leaderName", expression = "java(circle.getLeader().map(User::getName).orElse(null))")
-@interface CircleCommonWriterMappings {
-}
+@interface CircleCommonWriterMappings{}
@Mapper(componentModel = "spring")
public interface CircleDtoMapper extends UuidFileToUrlDtoMapper {
@@ -120,7 +119,6 @@ ExportCircleMemberToExcelResponseDto toExportCircleMemberToExcelResponseDto(
UserCouncilFee userCouncilFee,
Integer restOfSemester,
Boolean isAppliedThisSemester,
- Integer appliedSemester
- );
+ Integer appliedSemester);
}
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CommentDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CommentDtoMapper.java
index 281da8aeb..ad20fa268 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CommentDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/CommentDtoMapper.java
@@ -40,8 +40,7 @@ CommentResponseDto toCommentResponseDto(
Boolean updatable,
Boolean deletable,
Boolean isCommentSubscribed,
- Boolean isBlocked
- );
+ Boolean isBlocked);
@Mapping(target = "writerName", source = "childComment.writer.name")
@Mapping(target = "writerNickname", source = "childComment.writer.nickname")
@@ -58,8 +57,7 @@ ChildCommentResponseDto toChildCommentResponseDto(
Boolean isOwner,
Boolean updatable,
Boolean deletable,
- Boolean isBlocked
- );
+ Boolean isBlocked);
@Mapping(target = "commentId", source = "comment.id")
@Mapping(target = "userId", source = "user.id")
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/FormDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/FormDtoMapper.java
index b0826607f..e48aace4c 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/FormDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/FormDtoMapper.java
@@ -9,6 +9,11 @@
import org.mapstruct.factory.Mappers;
import org.springframework.data.domain.Page;
+import net.causw.app.main.api.dto.form.response.FormResponseDto;
+import net.causw.app.main.api.dto.form.response.OptionResponseDto;
+import net.causw.app.main.api.dto.form.response.OptionSummaryResponseDto;
+import net.causw.app.main.api.dto.form.response.QuestionResponseDto;
+import net.causw.app.main.api.dto.form.response.QuestionSummaryResponseDto;
import net.causw.app.main.api.dto.form.response.reply.ReplyPageResponseDto;
import net.causw.app.main.api.dto.form.response.reply.ReplyQuestionResponseDto;
import net.causw.app.main.api.dto.form.response.reply.ReplyResponseDto;
@@ -24,11 +29,6 @@
import net.causw.app.main.domain.community.form.entity.ReplyQuestion;
import net.causw.app.main.domain.community.form.enums.RegisteredSemester;
import net.causw.app.main.domain.finance.usercouncilfee.entity.UserCouncilFee;
-import net.causw.app.main.api.dto.form.response.FormResponseDto;
-import net.causw.app.main.api.dto.form.response.OptionResponseDto;
-import net.causw.app.main.api.dto.form.response.OptionSummaryResponseDto;
-import net.causw.app.main.api.dto.form.response.QuestionResponseDto;
-import net.causw.app.main.api.dto.form.response.QuestionSummaryResponseDto;
import net.causw.app.main.domain.user.account.entity.user.User;
@Mapper(componentModel = "spring")
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/PostDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/PostDtoMapper.java
index 2716f94a0..de83515a4 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/PostDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/PostDtoMapper.java
@@ -12,12 +12,6 @@
import org.mapstruct.factory.Mappers;
import org.springframework.data.domain.Page;
-import net.causw.app.main.api.dto.util.dtoMapper.custom.UuidFileToUrlDtoMapper;
-import net.causw.app.main.api.dto.vote.VoteResponseDto;
-import net.causw.app.main.domain.asset.file.entity.joinEntity.PostAttachImage;
-import net.causw.app.main.domain.community.board.entity.Board;
-import net.causw.app.main.domain.community.post.entity.Post;
-import net.causw.app.main.domain.community.post.repository.query.PostQueryResult;
import net.causw.app.main.api.dto.form.response.FormResponseDto;
import net.causw.app.main.api.dto.post.BoardPostsResponseDto;
import net.causw.app.main.api.dto.post.PostContentDto;
@@ -25,6 +19,12 @@
import net.causw.app.main.api.dto.post.PostResponseDto;
import net.causw.app.main.api.dto.post.PostSubscribeResponseDto;
import net.causw.app.main.api.dto.post.PostsResponseDto;
+import net.causw.app.main.api.dto.util.dtoMapper.custom.UuidFileToUrlDtoMapper;
+import net.causw.app.main.api.dto.vote.VoteResponseDto;
+import net.causw.app.main.domain.asset.file.entity.joinEntity.PostAttachImage;
+import net.causw.app.main.domain.community.board.entity.Board;
+import net.causw.app.main.domain.community.post.entity.Post;
+import net.causw.app.main.domain.community.post.repository.query.PostQueryResult;
import net.causw.app.main.domain.notification.notification.entity.UserPostSubscribe;
import net.causw.app.main.domain.user.account.enums.user.Role;
import net.causw.app.main.domain.user.account.enums.user.UserState;
@@ -36,8 +36,7 @@
@Mapping(target = "writerName", source = "post.writer.name")
@Mapping(target = "writerAdmissionYear", source = "post.writer.admissionYear")
@Mapping(target = "writerProfileImage", source = "post.writer.profileImage")
-@interface CommonPostWriterMappings {
-}
+@interface CommonPostWriterMappings{}
@Mapper(componentModel = "spring")
public interface PostDtoMapper extends UuidFileToUrlDtoMapper {
@@ -78,8 +77,7 @@ PostsResponseDto toPostsResponseDto(Post post, Long numComment, Long numPostLike
@Mapping(target = "postAttachImage", source = "queryResult.postAttachImage")
@Mapping(target = "isPostVote", source = "queryResult.isPostVote")
@Mapping(target = "isPostForm", source = "queryResult.isPostForm")
- @Mapping(target = "displayWriterNickname",
- expression = "java(getDisplayWriterNickname(queryResult.hasWriter(), queryResult.writerUserState(), queryResult.isAnonymous(), queryResult.writerNickname()))")
+ @Mapping(target = "displayWriterNickname", expression = "java(getDisplayWriterNickname(queryResult.hasWriter(), queryResult.writerUserState(), queryResult.isAnonymous(), queryResult.writerNickname()))")
PostsResponseDto toPostsResponseDto(PostQueryResult queryResult);
default String getDisplayWriterNickname(boolean hasWriter, UserState state, boolean isAnonymous, String nickname) {
@@ -131,8 +129,7 @@ PostResponseDto toPostResponseDtoExtended(
VoteResponseDto voteResponseDto,
Boolean isPostVote,
Boolean isPostForm,
- Boolean isPostSubscribed
- );
+ Boolean isPostSubscribed);
@Mapping(target = "title", source = "post.title")
@Mapping(target = "contentId", source = "post.id")
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/SemesterDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/SemesterDtoMapper.java
index b6b0f56d8..f10ac4b81 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/SemesterDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/SemesterDtoMapper.java
@@ -14,8 +14,7 @@
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD})
-@interface SemesterCommonWriterMappings {
-}
+@interface SemesterCommonWriterMappings{}
@Mapper(componentModel = "spring")
public interface SemesterDtoMapper {
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserAcademicRecordDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserAcademicRecordDtoMapper.java
index 5717d08ee..690f63eaf 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserAcademicRecordDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserAcademicRecordDtoMapper.java
@@ -27,8 +27,7 @@
@Mapping(target = "userId", source = "user.id")
@Mapping(target = "userName", source = "user.name")
@Mapping(target = "studentId", source = "user.studentId")
-@interface UserCommonWriterMappings {
-}
+@interface UserCommonWriterMappings{}
@Mapper(componentModel = "spring")
public interface UserAcademicRecordDtoMapper extends UuidFileToUrlDtoMapper {
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserCouncilFeeDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserCouncilFeeDtoMapper.java
index 373436035..8dff25cfd 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserCouncilFeeDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserCouncilFeeDtoMapper.java
@@ -18,8 +18,7 @@
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD})
-@interface UserCouncilFeeWriterMappings {
-}
+@interface UserCouncilFeeWriterMappings{}
@Mapper(componentModel = "spring")
public interface UserCouncilFeeDtoMapper {
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserDtoMapper.java
index b43bb8bad..68fe2c458 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/UserDtoMapper.java
@@ -12,25 +12,25 @@
import net.causw.app.main.api.dto.comment.CommentsOfUserResponseDto;
import net.causw.app.main.api.dto.duplicate.DuplicatedCheckResponseDto;
-import net.causw.app.main.api.dto.user.UserAdmissionsResponseDto;
-import net.causw.app.main.api.dto.user.UserFindIdResponseDto;
-import net.causw.app.main.api.dto.userInfo.UserCareerDto;
-import net.causw.app.main.api.dto.userInfo.UserInfoResponseDto;
-import net.causw.app.main.api.dto.userInfo.UserInfoSummaryResponseDto;
-import net.causw.app.main.api.dto.util.dtoMapper.custom.UuidFileToUrlDtoMapper;
-import net.causw.app.main.domain.community.board.entity.Board;
-import net.causw.app.main.domain.community.comment.entity.Comment;
-import net.causw.app.main.domain.community.post.entity.Post;
import net.causw.app.main.api.dto.post.PostsResponseDto;
import net.causw.app.main.api.dto.user.UserAdmissionResponseDto;
+import net.causw.app.main.api.dto.user.UserAdmissionsResponseDto;
import net.causw.app.main.api.dto.user.UserCommentsResponseDto;
import net.causw.app.main.api.dto.user.UserFcmTokenResponseDto;
+import net.causw.app.main.api.dto.user.UserFindIdResponseDto;
import net.causw.app.main.api.dto.user.UserPostResponseDto;
import net.causw.app.main.api.dto.user.UserPostsResponseDto;
import net.causw.app.main.api.dto.user.UserPrivilegedResponseDto;
import net.causw.app.main.api.dto.user.UserResponseDto;
import net.causw.app.main.api.dto.user.UserSignInResponseDto;
import net.causw.app.main.api.dto.user.UserSignOutResponseDto;
+import net.causw.app.main.api.dto.userInfo.UserCareerDto;
+import net.causw.app.main.api.dto.userInfo.UserInfoResponseDto;
+import net.causw.app.main.api.dto.userInfo.UserInfoSummaryResponseDto;
+import net.causw.app.main.api.dto.util.dtoMapper.custom.UuidFileToUrlDtoMapper;
+import net.causw.app.main.domain.community.board.entity.Board;
+import net.causw.app.main.domain.community.comment.entity.Comment;
+import net.causw.app.main.domain.community.post.entity.Post;
import net.causw.app.main.domain.user.account.entity.user.User;
import net.causw.app.main.domain.user.account.entity.user.UserAdmission;
import net.causw.app.main.domain.user.account.entity.user.UserAdmissionLog;
@@ -210,8 +210,8 @@ default List mapUserCareerListToResponseDtoList(List
.endYear(career.getEndYear())
.endMonth(career.getEndMonth())
.description(career.getDescription())
- .build()
- ).collect(Collectors.toList());
+ .build())
+ .collect(Collectors.toList());
}
@Mapping(target = "id", source = "userInfo.id")
@@ -224,7 +224,7 @@ default List mapUserCareerListToResponseDtoList(List
@Mapping(target = "department", source = "userInfo.user.department")
@Mapping(target = "description", source = "userInfo.description")
@Mapping(target = "job", source = "userInfo.job")
- // @Mapping(target = "userCareer", source = "userInfo.userCareer", qualifiedByName = "mapUserCareerListToResponseDtoList")
+ // @Mapping(target = "userCareer", source = "userInfo.userCareer", qualifiedByName = "mapUserCareerListToResponseDtoList")
UserInfoSummaryResponseDto toUserInfoSummaryResponseDto(UserInfo userInfo);
@Mapping(target = "id", source = "userInfo.id")
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/VoteDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/VoteDtoMapper.java
index e82c3ac4d..6fe794d7d 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/VoteDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/VoteDtoMapper.java
@@ -6,11 +6,11 @@
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
+import net.causw.app.main.api.dto.user.UserResponseDto;
import net.causw.app.main.api.dto.vote.VoteOptionResponseDto;
import net.causw.app.main.api.dto.vote.VoteResponseDto;
import net.causw.app.main.domain.community.vote.entity.Vote;
import net.causw.app.main.domain.community.vote.entity.VoteOption;
-import net.causw.app.main.api.dto.user.UserResponseDto;
@Mapper(componentModel = "spring")
public interface VoteDtoMapper {
diff --git a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/custom/UuidFileToUrlDtoMapper.java b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/custom/UuidFileToUrlDtoMapper.java
index f91fdde54..f78574559 100644
--- a/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/custom/UuidFileToUrlDtoMapper.java
+++ b/app-main/src/main/java/net/causw/app/main/api/dto/util/dtoMapper/custom/UuidFileToUrlDtoMapper.java
@@ -20,8 +20,7 @@ default String mapUuidFileToFileUrl(JoinEntity joinEntity) {
if (joinEntity == null) {
return null;
} else {
- return joinEntity.getUuidFile() == null ?
- null
+ return joinEntity.getUuidFile() == null ? null
: joinEntity.getUuidFile().getFileUrl();
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/core/aop/LogAspect.java b/app-main/src/main/java/net/causw/app/main/core/aop/LogAspect.java
index 5f9346788..2d74791cb 100644
--- a/app-main/src/main/java/net/causw/app/main/core/aop/LogAspect.java
+++ b/app-main/src/main/java/net/causw/app/main/core/aop/LogAspect.java
@@ -18,8 +18,7 @@ public class LogAspect {
// @MeasureTime 애노테이션이 붙은 클래스의 메서드를 대상으로 설정
@Pointcut("@within(net.causw.app.main.core.aop.annotation.MeasureTime)")
- private void timer() {
- }
+ private void timer() {}
// 메서드 실행 전,후로 시간을 측정하고, 실행된 메서드와 실행시간을 로깅
@Around("timer()")
diff --git a/app-main/src/main/java/net/causw/app/main/core/aop/annotation/MeasureTime.java b/app-main/src/main/java/net/causw/app/main/core/aop/annotation/MeasureTime.java
index 8160ab5ad..be6a10b4a 100644
--- a/app-main/src/main/java/net/causw/app/main/core/aop/annotation/MeasureTime.java
+++ b/app-main/src/main/java/net/causw/app/main/core/aop/annotation/MeasureTime.java
@@ -7,5 +7,4 @@
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
-public @interface MeasureTime {
-}
\ No newline at end of file
+public @interface MeasureTime{}
\ No newline at end of file
diff --git a/app-main/src/main/java/net/causw/app/main/core/batch/BatchScheduler.java b/app-main/src/main/java/net/causw/app/main/core/batch/BatchScheduler.java
index f219d9131..659aac282 100644
--- a/app-main/src/main/java/net/causw/app/main/core/batch/BatchScheduler.java
+++ b/app-main/src/main/java/net/causw/app/main/core/batch/BatchScheduler.java
@@ -47,7 +47,7 @@ public void scheduleCleanUpJob() {
jobLauncher.run(cleanUpUnusedFilesJob, jobParameters);
} catch (Exception e) {
- log.error("Batch job failed: {}", e.getMessage()); // 예외 로깅 추가
+ log.error("Batch job failed: {}", e.getMessage()); // 예외 로깅 추가
throw new InternalServerException(ErrorCode.INTERNAL_SERVER, MessageUtil.BATCH_FAIL + e.getMessage());
}
}
diff --git a/app-main/src/main/java/net/causw/app/main/core/batch/listener/CheckMeasureStepListener.java b/app-main/src/main/java/net/causw/app/main/core/batch/listener/CheckMeasureStepListener.java
index 0f279a949..624ba34f8 100644
--- a/app-main/src/main/java/net/causw/app/main/core/batch/listener/CheckMeasureStepListener.java
+++ b/app-main/src/main/java/net/causw/app/main/core/batch/listener/CheckMeasureStepListener.java
@@ -27,8 +27,8 @@ public ExitStatus afterStep(StepExecution stepExecution) {
long executionTime = endTime - startTime;
// 실행 시간과 마지막 pageNum을 ExitStatus에 기록
- String exitDescription =
- "Completed Step. Last PageNum: " + dataRow + ", Execution Time: " + executionTime + " ms";
+ String exitDescription = "Completed Step. Last PageNum: " + dataRow + ", Execution Time: " + executionTime
+ + " ms";
stepExecution.setExitStatus(new ExitStatus("COMPLETED", exitDescription));
return ExitStatus.COMPLETED;
diff --git a/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteFileStepListener.java b/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteFileStepListener.java
index 757479f71..2797fab78 100644
--- a/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteFileStepListener.java
+++ b/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteFileStepListener.java
@@ -10,7 +10,8 @@
public class DeleteFileStepListener implements StepExecutionListener {
@Override
- public void beforeStep(@NotNull StepExecution stepExecution) {
+ public void beforeStep(@NotNull
+ StepExecution stepExecution) {
// Step 실행 전 로직: Step 시작 시간 기록
stepExecution.getExecutionContext().putLong("startTime", System.currentTimeMillis());
}
@@ -26,8 +27,8 @@ public ExitStatus afterStep(StepExecution stepExecution) {
long executionTime = endTime - startTime;
// Exit 메시지에 삭제된 파일 수 기록
- String exitDescription =
- "Deleted " + deletedFileCount + " unused files. Execution Time: " + executionTime + " ms";
+ String exitDescription = "Deleted " + deletedFileCount + " unused files. Execution Time: " + executionTime
+ + " ms";
stepExecution.setExitStatus(new ExitStatus("COMPLETED", exitDescription));
return stepExecution.getExitStatus();
}
diff --git a/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteUnusedFileJobCompletionNotificationListener.java b/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteUnusedFileJobCompletionNotificationListener.java
index aef0cecf5..baf980c30 100644
--- a/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteUnusedFileJobCompletionNotificationListener.java
+++ b/app-main/src/main/java/net/causw/app/main/core/batch/listener/DeleteUnusedFileJobCompletionNotificationListener.java
@@ -10,7 +10,8 @@
public class DeleteUnusedFileJobCompletionNotificationListener implements JobExecutionListener {
@Override
- public void beforeJob(@NotNull JobExecution jobExecution) {
+ public void beforeJob(@NotNull
+ JobExecution jobExecution) {
// Step 실행 전 로직: Step 시작 시간 기록
jobExecution.getExecutionContext().putLong("startTime", System.currentTimeMillis());
}
diff --git a/app-main/src/main/java/net/causw/app/main/core/config/async/AsyncConfig.java b/app-main/src/main/java/net/causw/app/main/core/config/async/AsyncConfig.java
index 05e5a0d36..923d5dcb5 100644
--- a/app-main/src/main/java/net/causw/app/main/core/config/async/AsyncConfig.java
+++ b/app-main/src/main/java/net/causw/app/main/core/config/async/AsyncConfig.java
@@ -14,9 +14,9 @@ public class AsyncConfig {
@Bean(name = "asyncExecutor")
public Executor asyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
- executor.setCorePoolSize(5); // 기본 스레드 수
- executor.setMaxPoolSize(20); // 최대 스레드 수
- executor.setQueueCapacity(100); // 큐에 쌓이는 작업 수
+ executor.setCorePoolSize(5); // 기본 스레드 수
+ executor.setMaxPoolSize(20); // 최대 스레드 수
+ executor.setQueueCapacity(100); // 큐에 쌓이는 작업 수
executor.setThreadNamePrefix("Async-"); // 로그 확인용 쓰레드 이름 접두사
executor.initialize();
return executor;
diff --git a/app-main/src/main/java/net/causw/app/main/core/config/batch/CleanUnusedUuidFilesBatchConfig.java b/app-main/src/main/java/net/causw/app/main/core/config/batch/CleanUnusedUuidFilesBatchConfig.java
index 4b009d02b..b66dae599 100644
--- a/app-main/src/main/java/net/causw/app/main/core/config/batch/CleanUnusedUuidFilesBatchConfig.java
+++ b/app-main/src/main/java/net/causw/app/main/core/config/batch/CleanUnusedUuidFilesBatchConfig.java
@@ -47,17 +47,26 @@ public RetryTemplate retryTemplate() {
@Bean
public Job cleanUpUnusedFilesJob(JobRepository jobRepository,
DeleteUnusedFileJobCompletionNotificationListener deleteUnusedFileJobCompletionNotificationListener,
- @Qualifier("initIsUsedUuidFileIntegrationStep") Step initIsUsedUuidFileIntegrationStep,
- @Qualifier("checkIsUsedWithCalendarAttachImageIntegrationStep") Step checkIsUsedWithCalendarAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithCircleMainImageIntegrationStep") Step checkIsUsedWithCircleMainImageIntegrationStep,
- @Qualifier("checkIsUsedWithEventAttachImageIntegrationStep") Step checkIsUsedWithEventAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithPostAttachImageIntegrationStep") Step checkIsUsedWithPostAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithUserAcademicRecordApplicationAttachImageIntegrationStep") Step checkIsUsedWithUserAcademicRecordApplicationAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithUserAdmissionAttachImageIntegrationStep") Step checkIsUsedWithUserAdmissionAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithUserAdmissionLogAttachImageIntegrationStep") Step checkIsUsedWithUserAdmissionLogAttachImageIntegrationStep,
- @Qualifier("checkIsUsedWithUserProfileImageIntegrationStep") Step checkIsUsedWithUserProfileImageIntegrationStep,
- @Qualifier("deleteFileNotUsedStep") Step deleteFileNotUsedStep
- ) {
+ @Qualifier("initIsUsedUuidFileIntegrationStep")
+ Step initIsUsedUuidFileIntegrationStep,
+ @Qualifier("checkIsUsedWithCalendarAttachImageIntegrationStep")
+ Step checkIsUsedWithCalendarAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithCircleMainImageIntegrationStep")
+ Step checkIsUsedWithCircleMainImageIntegrationStep,
+ @Qualifier("checkIsUsedWithEventAttachImageIntegrationStep")
+ Step checkIsUsedWithEventAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithPostAttachImageIntegrationStep")
+ Step checkIsUsedWithPostAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithUserAcademicRecordApplicationAttachImageIntegrationStep")
+ Step checkIsUsedWithUserAcademicRecordApplicationAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithUserAdmissionAttachImageIntegrationStep")
+ Step checkIsUsedWithUserAdmissionAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithUserAdmissionLogAttachImageIntegrationStep")
+ Step checkIsUsedWithUserAdmissionLogAttachImageIntegrationStep,
+ @Qualifier("checkIsUsedWithUserProfileImageIntegrationStep")
+ Step checkIsUsedWithUserProfileImageIntegrationStep,
+ @Qualifier("deleteFileNotUsedStep")
+ Step deleteFileNotUsedStep) {
return new JobBuilder("cleanUpUnusedFilesJob", jobRepository)
.listener(deleteUnusedFileJobCompletionNotificationListener)
.start(initIsUsedUuidFileIntegrationStep)
diff --git a/app-main/src/main/java/net/causw/app/main/core/config/persistence/JpaConfig.java b/app-main/src/main/java/net/causw/app/main/core/config/persistence/JpaConfig.java
index 28203c5f8..f24533365 100644
--- a/app-main/src/main/java/net/causw/app/main/core/config/persistence/JpaConfig.java
+++ b/app-main/src/main/java/net/causw/app/main/core/config/persistence/JpaConfig.java
@@ -5,5 +5,4 @@
@Configuration
@EnableJpaAuditing
-public class JpaConfig {
-}
+public class JpaConfig {}
diff --git a/app-main/src/main/java/net/causw/app/main/core/config/scheduling/SchedulingConfig.java b/app-main/src/main/java/net/causw/app/main/core/config/scheduling/SchedulingConfig.java
index b49dea662..ffed87d73 100644
--- a/app-main/src/main/java/net/causw/app/main/core/config/scheduling/SchedulingConfig.java
+++ b/app-main/src/main/java/net/causw/app/main/core/config/scheduling/SchedulingConfig.java
@@ -5,5 +5,4 @@
@Configuration
@EnableScheduling
-public class SchedulingConfig {
-}
+public class SchedulingConfig {}
diff --git a/app-main/src/main/java/net/causw/app/main/core/datasourceProxy/ApiQueryCountListener.java b/app-main/src/main/java/net/causw/app/main/core/datasourceProxy/ApiQueryCountListener.java
index dcf90295d..b3b5b3d87 100644
--- a/app-main/src/main/java/net/causw/app/main/core/datasourceProxy/ApiQueryCountListener.java
+++ b/app-main/src/main/java/net/causw/app/main/core/datasourceProxy/ApiQueryCountListener.java
@@ -2,43 +2,44 @@
import java.util.List;
import java.util.stream.Collectors;
+
+import org.springframework.stereotype.Component;
+
import net.ttddyy.dsproxy.ExecutionInfo;
import net.ttddyy.dsproxy.QueryInfo;
import net.ttddyy.dsproxy.listener.QueryExecutionListener;
import net.ttddyy.dsproxy.proxy.ParameterSetOperation;
-import org.springframework.stereotype.Component;
@Component
public class ApiQueryCountListener implements QueryExecutionListener {
- @Override
- public void afterQuery(ExecutionInfo execInfo, List queryInfoList) {
- if (queryInfoList.isEmpty()) {
- return;
- }
-
- String query = queryInfoList.stream()
- .map(QueryInfo::getQuery)
- .collect(Collectors.joining(";\n"));
-
- List