package sgc.portal.cw.cw1503.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1503.model.CW15030001U;
import sgc.portal.cw.cw1503.dto.CW15030001USearch;
import sgc.portal.cw.cw1503.service.CW15030001UService;

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

@RestController
@RequestMapping("/cw/cw1503")
public class CW15030001UController {
    private final CW15030001UService service;

    public CW15030001UController(CW15030001UService service) {
        this.service = service;
    }

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

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