Skip to content

Commit

Permalink
Merge pull request #195 from fourix4/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
TaeHoon0 authored Jul 28, 2024
2 parents 82f3ccd + d7164c3 commit 54ebaa0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<UsageFeeRequestDto> usageFee, @RequestParam MultipartFile titleImage,
@RequestParam List<MultipartFile> 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<UsageFeeRequestDto> usageFee,
@RequestParam(name = "title_image", required = false) MultipartFile titleImage,
@RequestParam(name = "multiple_images", required = false) List<MultipartFile> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<MultipartFile> multipleImages = managerRequestDto.getMultipleImages();
cafeImageService.deleteCafeImages(thumbnail, seatChart, multipleImages, studyCafe);
cafeImageService.saveCafeImages(thumbnail, seatChart, multipleImages, studyCafe);
*/

}

public ManagerResponseDto getStudyCafe() {
Expand Down

0 comments on commit 54ebaa0

Please sign in to comment.