package com.caliverse.admin.domain.api; import com.caliverse.admin.domain.request.EventRequest; import com.caliverse.admin.domain.request.LandRequest; import com.caliverse.admin.domain.response.EventResponse; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import com.caliverse.admin.domain.response.LandResponse; import com.caliverse.admin.domain.service.LandService; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import java.util.Map; @Tag(name = "랜드 정보 조회", description = "랜드 정보 조회 api") @RestController @RequiredArgsConstructor @RequestMapping("/api/v1/land") public class LandController { private final LandService landService; @GetMapping("/info") public ResponseEntity getLandInfoList( @RequestParam Map requestParam){ return ResponseEntity.ok().body( landService.getLandInfo(requestParam)); } @GetMapping("/auction/list") public ResponseEntity getLandAuctionList( @RequestParam Map requestParam){ return ResponseEntity.ok().body( landService.getLandAuctionList(requestParam)); } @GetMapping("/list") public ResponseEntity getList(){ return ResponseEntity.ok().body( landService.getLandList()); } @GetMapping("/building/list") public ResponseEntity getBuildingList(){ return ResponseEntity.ok().body( landService.getBuildingList()); } @GetMapping("/detail/{id}") public ResponseEntity getLandDetail( @PathVariable("id") Long id){ return ResponseEntity.ok().body( landService.getLandDetail(id)); } @GetMapping("/auction/detail/{id}") public ResponseEntity getLandAuctionDetail( @PathVariable("id") Long id){ return ResponseEntity.ok().body( landService.getLandAuctionDetail(id)); } @PostMapping("/auction") public ResponseEntity postLandAuction( @RequestBody LandRequest landRequest){ return ResponseEntity.ok().body(landService.postLandAuction(landRequest)); } @PutMapping("/auction/{id}") public ResponseEntity updateLandAuction( @PathVariable("id")Long id, @RequestBody LandRequest landRequest){ return ResponseEntity.ok().body(landService.updateLandAuction(id, landRequest)); } @DeleteMapping("/auction/delete") public ResponseEntity deleteLandAuction( @RequestBody LandRequest landRequest){ return ResponseEntity.ok().body(landService.deleteLandAuction(landRequest)); } }