package sgc.portal.cw.cw1506.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1506.model.CW15060001U;
import sgc.portal.cw.cw1506.dto.CW15060001USearch;
import sgc.portal.cw.cw1506.service.CW15060001UService;

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

@RestController
@RequestMapping("/cw/cw1506")
public class CW15060001UController {
    private final CW15060001UService service;

    public CW15060001UController(CW15060001UService service) {
        this.service = service;
    }

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

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