diff --git a/src/main/java/com/example/CatchStudy/controller/ManagerController.java b/src/main/java/com/example/CatchStudy/controller/ManagerController.java index 1fbf253..67af339 100644 --- a/src/main/java/com/example/CatchStudy/controller/ManagerController.java +++ b/src/main/java/com/example/CatchStudy/controller/ManagerController.java @@ -41,14 +41,20 @@ public Response saveStudyCafe(@RequestParam String cafeName, @RequestParam Addre } @PatchMapping("/manager") - public Response updateStudyCafe(@RequestParam String cafeName, @RequestParam AddressRequestDto address, - @RequestParam String openingHours, @RequestParam String closedHours, - @RequestParam String closedDay, @RequestParam String cafePhone, - @RequestParam Integer seats, @RequestParam RoomInfoRequestDto roomInfo, - @RequestParam List usageFee, @RequestParam MultipartFile titleImage, - @RequestParam List multipleImages, @RequestParam MultipartFile seatChartImage) { - ManagerRequestDto managerRequestDto = new ManagerRequestDto( - cafeName, address, openingHours, closedHours, closedDay, cafePhone, seats, roomInfo, usageFee, titleImage, multipleImages, seatChartImage); + public Response updateStudyCafe(@RequestParam(name = "cafe_name") String cafeName, + @RequestParam(name = "address") AddressRequestDto address, + @RequestParam(name = "opening_hours") String openingHours, + @RequestParam(name = "closed_hours") String closedHours, + @RequestParam(name = "closed_day") String closedDay, + @RequestParam(name = "cafe_phone") String cafePhone, + @RequestParam(name = "seats") Integer seats, + @RequestParam(name = "room_info") RoomInfoRequestDto roomInfo, + @RequestParam(name = "usage_fee") List usageFee, + @RequestParam(name = "title_image", required = false) MultipartFile titleImage, + @RequestParam(name = "multiple_images", required = false) List multipleImages, + @RequestParam(name = "seat_chart_image", required = false) MultipartFile seatChartImage) { + ManagerRequestDto managerRequestDto = new ManagerRequestDto( + cafeName, address, openingHours, closedHours, closedDay, cafePhone, seats, roomInfo, usageFee, titleImage, multipleImages, seatChartImage); managerService.updateStudyCafe(managerRequestDto); return Response.success(); diff --git a/src/main/java/com/example/CatchStudy/service/ManagerService.java b/src/main/java/com/example/CatchStudy/service/ManagerService.java index 4afc141..54139c9 100644 --- a/src/main/java/com/example/CatchStudy/service/ManagerService.java +++ b/src/main/java/com/example/CatchStudy/service/ManagerService.java @@ -96,12 +96,14 @@ public void updateStudyCafe(ManagerRequestDto managerRequestDto) { for(int i = 1; i <= managerRequestDto.getSeats(); i++) { seatService.saveSeat(Integer.toString(i), studyCafe); } - + /* MultipartFile thumbnail = managerRequestDto.getTitleImage(); MultipartFile seatChart = managerRequestDto.getSeatChartImage(); List multipleImages = managerRequestDto.getMultipleImages(); cafeImageService.deleteCafeImages(thumbnail, seatChart, multipleImages, studyCafe); cafeImageService.saveCafeImages(thumbnail, seatChart, multipleImages, studyCafe); + */ + } public ManagerResponseDto getStudyCafe() {