|
@@ -1,9 +1,11 @@
|
|
package com.its.api.its.controller.parking;
|
|
package com.its.api.its.controller.parking;
|
|
|
|
|
|
|
|
+import com.its.api.its.model.dto.common.UsageCountDto;
|
|
import com.its.api.its.model.dto.parking.ParkingLotDto;
|
|
import com.its.api.its.model.dto.parking.ParkingLotDto;
|
|
import com.its.api.its.service.parking.ParkingLotService;
|
|
import com.its.api.its.service.parking.ParkingLotService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -28,10 +30,20 @@ public class ParkingLotController {
|
|
|
|
|
|
@ApiOperation(value = "주차장 개별조회(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@ApiOperation(value = "주차장 개별조회(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
@GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
- public ParkingLotDto findById(@PathVariable final String id) {
|
|
|
|
|
|
+ public ParkingLotDto findById(
|
|
|
|
+ @ApiParam(name = "id", value = "주차장 ID", example = "PAR0000001", required = true)
|
|
|
|
+ @PathVariable final String id) {
|
|
return this.service.findById(id);
|
|
return this.service.findById(id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "주차장 사용여부 조회(신규 아이디 만들때 사용)", response = UsageCountDto.class)
|
|
|
|
+ @GetMapping(value = "/usage/{id}", produces = {"application/json; charset=utf8"})
|
|
|
|
+ public UsageCountDto findUsageId(
|
|
|
|
+ @ApiParam(name = "id", value = "주차장 ID", example = "PAR0000001", required = true)
|
|
|
|
+ @PathVariable final String id) {
|
|
|
|
+ return this.service.findUsageId(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
/*@ApiOperation(value = "주차장 정보변경(PARKINGLOT)", response = ParkingLotDto.class)
|
|
/*@ApiOperation(value = "주차장 정보변경(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@PutMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
@PutMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
public ParkingLotDto updateById(@PathVariable final String id, @RequestBody @Valid final ParkingLotDto.ParkingLotUpdReq req) {
|
|
public ParkingLotDto updateById(@PathVariable final String id, @RequestBody @Valid final ParkingLotDto.ParkingLotUpdReq req) {
|
|
@@ -46,13 +58,18 @@ public class ParkingLotController {
|
|
|
|
|
|
@ApiOperation(value = "주차장 정보변경/생성-개별(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@ApiOperation(value = "주차장 정보변경/생성-개별(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
@PostMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
- public ParkingLotDto mergeInfo(@PathVariable("id") String id, @RequestBody @Valid final ParkingLotDto.ParkingLotUpdReq req) {
|
|
|
|
|
|
+ public ParkingLotDto mergeInfo(
|
|
|
|
+ @ApiParam(name = "id", value = "주차장 ID", example = "PAR0000001", required = true)
|
|
|
|
+ @PathVariable("id") String id,
|
|
|
|
+ @RequestBody @Valid final ParkingLotDto.ParkingLotUpdReq req) {
|
|
return this.service.mergeInfo(req);
|
|
return this.service.mergeInfo(req);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "주차장 정보삭제-개별(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@ApiOperation(value = "주차장 정보삭제-개별(PARKINGLOT)", response = ParkingLotDto.class)
|
|
@DeleteMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
@DeleteMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
- public ParkingLotDto deleteDataById(@PathVariable("id") String id) {
|
|
|
|
|
|
+ public ParkingLotDto deleteDataById(
|
|
|
|
+ @ApiParam(name = "id", value = "주차장 ID", example = "PAR0000001", required = true)
|
|
|
|
+ @PathVariable("id") String id) {
|
|
return this.service.deleteById(id);
|
|
return this.service.deleteById(id);
|
|
}
|
|
}
|
|
|
|
|