|
@@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
import java.util.List;
|
|
|
-import java.util.NoSuchElementException;
|
|
|
|
|
|
@Api(tags = "09.기초데이터관리-02.링크")
|
|
|
@Validated
|
|
@@ -41,37 +40,20 @@ public class TbLinkController {
|
|
|
|
|
|
@ApiOperation(value = "링크정보 개별조회(TB_LINK)", response = TbLinkDto.class)
|
|
|
@GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
|
|
|
- public TbLinkDto findById(@PathVariable final Long id) throws NoSuchElementException {
|
|
|
- try {
|
|
|
- return this.service.findById(id);
|
|
|
- }
|
|
|
- catch (NoSuchElementException e) {
|
|
|
- throw e;
|
|
|
- }
|
|
|
+ public TbLinkDto findById(@PathVariable final Long id) {
|
|
|
+ return this.service.findById(id);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "링크정보 도로명변경(TB_LINK)", response = TbLinkDto.class)
|
|
|
@PutMapping(value = "/name/{id}", produces = {"application/json; charset=utf8"})
|
|
|
- public TbLinkDto updateNameById(@PathVariable final Long id, @RequestBody @Valid final TbLinkDto.TbLinkNameUpdReq req)
|
|
|
- throws NoSuchElementException {
|
|
|
- try {
|
|
|
- return this.service.updateNameById(id, req);
|
|
|
- }
|
|
|
- catch (NoSuchElementException e) {
|
|
|
- throw e;
|
|
|
- }
|
|
|
+ public TbLinkDto updateNameById(@PathVariable final Long id, @RequestBody @Valid final TbLinkDto.TbLinkNameUpdReq req) {
|
|
|
+ return this.service.updateNameById(id, req);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "링크정보 구간등급 변경(TB_LINK)", response = TbLinkDto.class)
|
|
|
@PutMapping(value = "/sect-grad/{id}", produces = {"application/json; charset=utf8"})
|
|
|
- public TbLinkDto updateSectGradById(@PathVariable final Long id, @RequestBody @Valid final TbLinkDto.TbLinkSectGradUpdReq req)
|
|
|
- throws NoSuchElementException {
|
|
|
- try {
|
|
|
- return this.service.updateSectGradById(id, req);
|
|
|
- }
|
|
|
- catch (NoSuchElementException e) {
|
|
|
- throw e;
|
|
|
- }
|
|
|
+ public TbLinkDto updateSectGradById(@PathVariable final Long id, @RequestBody @Valid final TbLinkDto.TbLinkSectGradUpdReq req) {
|
|
|
+ return this.service.updateSectGradById(id, req);
|
|
|
}
|
|
|
|
|
|
}
|