| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package com.its.op.controller.database;
- import com.its.op.model.dto.database.LinkPrcsParaDto;
- import com.its.op.service.database.LinkPrcsParaService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.http.HttpStatus;
- import org.springframework.http.ResponseEntity;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- @Slf4j
- @RequiredArgsConstructor
- @RestController
- @RequestMapping("/api/database/link-prcs-para")
- @Api(tags = "09.기초데이터관리-06.가공파라미터관리-01.가공파라미터관리")
- public class LinkPrcsParaController {
- private final LinkPrcsParaService service;
- @ApiOperation(value = "개별정보조회(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaInfo.class)
- @GetMapping(value = "/{id}", produces = {"application/json; charset=utf8"})
- public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaInfo> findById(@PathVariable final Long id) {
- LinkPrcsParaDto.LinkPrcsParaInfo result = this.service.findListById(id);
- return new ResponseEntity<>(result, HttpStatus.OK);
- }
- @ApiOperation(value = "개별정보변경/생성(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaUpdateReq.class)
- @PostMapping(value = "/{ids}", produces = {"application/json; charset=utf8"})
- public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaUpdateReq> mergeById(
- @PathVariable final List<Long> ids,
- @RequestBody final LinkPrcsParaDto.LinkPrcsParaUpdateReq req) {
- log.error("{}, [{}]", ids.size(), ids);
- log.error("{}", req);
- LinkPrcsParaDto.LinkPrcsParaUpdateReq result = this.service.mergeById(ids, req);
- return new ResponseEntity<>(result, HttpStatus.OK);
- }
- @ApiOperation(value = "전체정보변경/생성(TB_LINK_PARA_STUP, TB_LINK_PARA_DETL, TB_LINK_PARA_CLCT_SYST)", response = LinkPrcsParaDto.LinkPrcsParaUpdateReq.class)
- @PostMapping(value = "", produces = {"application/json; charset=utf8"})
- public ResponseEntity<LinkPrcsParaDto.LinkPrcsParaUpdateReq> updateById(@RequestBody final LinkPrcsParaDto.LinkPrcsParaUpdateReq req) {
- LinkPrcsParaDto.LinkPrcsParaUpdateReq result = this.service.mergeAll(req);
- return new ResponseEntity<>(result, HttpStatus.OK);
- }
- }
|