package sgc.portal.com.com.web;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.com.model.Comm;
import sgc.portal.com.com.model.CommDtl;
import sgc.portal.com.com.service.ComCommMngService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**********************************************************
 * 시스템명  : 시스템관리(COM)
 * 프로그램ID : ComCommMngController
 * 프로그램명   : 공통코드정보관리 Controller
 * @author       : Kim Gyu Yong(aaaa@aaa.co.kr)
 * @version   :  2020-09-03
 * @since JDK1.8
 * @see
 * 1. 최초 작성
**********************************************************/
@RestController
public class ComCommMngController {

    @Autowired
    private ComCommMngService comCommMngService;

    /**
     *

     * @param
     * @return
     * @throws Exception
     *
     */
    @PostMapping(value = "/com/com/selectComCommMng")
    public List<EasyHashMap<String, Object>> selectComCommMng(@RequestBody Comm comms) {

        return comCommMngService.selectComCommMng(comms);
    }

    @PostMapping(value = "/com/com/saveComCommMng")
    public void saveComCommMng(@RequestBody List<Comm> comms) {
        comCommMngService.saveComCommMng(comms);
    }

    @PostMapping(value = "/com/com/selectComCommDtlMng")
    public List<EasyHashMap<String, Object>> selectComCommDtlMng(@RequestBody CommDtl commdtls) {

        return comCommMngService.selectComCommDtlMng(commdtls);
    }

    @PostMapping(value = "/com/com/saveComCommDtlMng")
    public void saveComCommDtlMng(@RequestBody List<CommDtl> commdtls) {
        comCommMngService.saveComCommDtlMng(commdtls);
    }

}
