package sgc.portal.cw.cw0614.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0614.dto.CW06140001USearch;
import sgc.portal.cw.cw0614.model.CW06140001U;
import sgc.portal.cw.cw0614.service.CW06140001UService;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cw/cw0614")
public class CW06140001UController {
    private final CW06140001UService service;

    public CW06140001UController(CW06140001UService service) {
        this.service = service;
    }

    @PostMapping("/CW06140001U/list")
    public List<EasyHashMap<String, Object>> getList(@RequestBody CW06140001USearch search) {
        return service.getList(search);
    }

    @PostMapping("/CW06140001U/save")
    public Map<String, String> save(@RequestBody List<CW06140001U> CW06140001U) {
    	return service.save(CW06140001U);
    }
    
    @PostMapping("/CW06140001U/copyQuetion")
    public void copy(@RequestBody CW06140001USearch search) {
    	service.copy(search);
    }
}
