package sgc.portal.cw.cw1403.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1403.dto.CW14030001USearch;
import sgc.portal.cw.cw1403.model.CW14030001U;
import sgc.portal.cw.cw1403.service.CW14030001UService;

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

@RestController
@RequestMapping("/cw/cw1403")
public class CW14030001UController {
    private final CW14030001UService service;

    public CW14030001UController(CW14030001UService service) {
        this.service = service;
    }

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

    @PostMapping("/CW14030001U/save")
    public Map<String, String> save(@RequestBody List<CW14030001U> CW14030001U) {
    	return service.save(CW14030001U);
    }

    @PostMapping("/CW14030001U/draw")
    public Map<String, String> draw(@RequestBody CW14030001USearch search) {
        return service.draw(search);
    }
}
