diff --git a/src/main/java/com/umc/commonplant/domain/calendar/controller/CalendarController.java b/src/main/java/com/umc/commonplant/domain/calendar/controller/CalendarController.java index 3f9cf0d..438b2ad 100644 --- a/src/main/java/com/umc/commonplant/domain/calendar/controller/CalendarController.java +++ b/src/main/java/com/umc/commonplant/domain/calendar/controller/CalendarController.java @@ -10,6 +10,7 @@ import com.umc.commonplant.domain.user.service.UserService; import com.umc.commonplant.global.dto.JsonResponse; import io.swagger.v3.core.util.Json; +import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; @@ -27,10 +28,15 @@ public class CalendarController implements CalendarSwagger { private final JwtService jwtService; private final UserService userService; + @Operation(hidden = true) @GetMapping public ResponseEntity getCalendarByDate(@RequestParam("year") String year, @RequestParam("month") String month, @RequestParam("day") String day) { + log.info("[API] getCalendarByMonth - 캘린더 조회 (일별)"); + + String uuid = jwtService.resolveToken(); + User user = userService.getUser(uuid); return ResponseEntity.ok(new JsonResponse(true, 200, "getCalendarByDate", null)); } @@ -52,6 +58,7 @@ public ResponseEntity getCalendarByMonth(@RequestParam("year") Str return ResponseEntity.ok(new JsonResponse(true, 200, "getCalendarByMonth", monthlyCalendar)); } + @Operation(hidden = true) @GetMapping("/place") public ResponseEntity getCalendarByPlace() { String uuid = jwtService.resolveToken(); @@ -62,6 +69,7 @@ public ResponseEntity getCalendarByPlace() { return ResponseEntity.ok(new JsonResponse(true, 200, "getPlaceList", placeList)); } + @Operation(hidden = true) @GetMapping("/place/plant") public ResponseEntity getCalendarByPlaceAndPlant(@RequestParam("code") String code) { String uuid = jwtService.resolveToken(); @@ -72,6 +80,7 @@ public ResponseEntity getCalendarByPlaceAndPlant(@RequestParam("co return ResponseEntity.ok(new JsonResponse(true, 200, "getPlantList", plantList)); } + @Operation(hidden = true) @GetMapping("/place/plant/memo") public ResponseEntity getCalendarByPlaceAndPlantAndMemo(@RequestParam("code") String code, @RequestParam("plant") Long plantIdx) { diff --git a/src/main/java/com/umc/commonplant/domain/calendar/dto/CalendarDto.java b/src/main/java/com/umc/commonplant/domain/calendar/dto/CalendarDto.java index 631e36f..c9b0c13 100644 --- a/src/main/java/com/umc/commonplant/domain/calendar/dto/CalendarDto.java +++ b/src/main/java/com/umc/commonplant/domain/calendar/dto/CalendarDto.java @@ -52,7 +52,28 @@ public getMyCalendarEventRes(int parsedDate, boolean nextWatered, boolean prevWa this.writeMemo = writeMemo; } } - + + /** + * 최종 My Calendar (By Date) Response + */ + @AllArgsConstructor + @NoArgsConstructor + @Getter + public static class getMyCalendarByDateRes { + private int year; + private int month; + private int day; + + private List placesByDate; + + @Builder + public getMyCalendarByDateRes(int year, int month, int day){ + this.year = year; + this.month = month; + this.day = day; + } + } + /** * My Calendar에 보여줄 Place 리스트 */ @@ -61,6 +82,13 @@ public getMyCalendarEventRes(int parsedDate, boolean nextWatered, boolean prevWa @Getter public static class getMyCalendarPlaceListRes{ private String name; + + private List plantsByPlace; + + @Builder + public getMyCalendarPlaceListRes(String name){ + this.name = name; + } } /** @@ -70,12 +98,16 @@ public static class getMyCalendarPlaceListRes{ @NoArgsConstructor @Getter public static class getMyCalendarPlantListRes{ + private Long plantIdx; private String plantName; private String nickname; private String imgUrl; + private List memosByPlant; + @Builder public getMyCalendarPlantListRes(Plant plant){ + this.plantIdx = plant.getPlantIdx(); this.plantName = plant.getPlantName(); this.nickname = plant.getNickname(); this.imgUrl = plant.getImgUrl();