package sgc.portal.cd.cdcom.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cd.cdcom.dto.CDCOMSearch;
import sgc.portal.cd.cdcom.service.CDCOMService;

import java.util.List;

@RestController
@RequestMapping("/cd/cdcom")
public class CDCOMController {
    private final CDCOMService service;

    public CDCOMController(CDCOMService service) {
        this.service = service;
    }
    
    //본부
    @PostMapping("/CDCOM/getComboCcgrpKo")
    public List<EasyHashMap<String, Object>> getComboCcgrpKo(@RequestBody CDCOMSearch search) {
        return service.getComboCcgrpKo(search);
    }
    
    @PostMapping("/CDCOM/getComboCcgrpEn")
    public List<EasyHashMap<String, Object>> getComboCcgrpEn(@RequestBody CDCOMSearch search) {
        return service.getComboCcgrpEn(search);
    }

    @PostMapping("/CDCOM/getComboCcgrpKo2")
    public List<EasyHashMap<String, Object>> getComboCcgrpKo2(@RequestBody CDCOMSearch search) {
        return service.getComboCcgrpKo2(search);
    }
}
