package sgc.portal.cw.cw1505.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1505.model.CW15050001U;
import sgc.portal.cw.cw1505.dto.CW15050001USearch;
import sgc.portal.cw.cw1505.service.CW15050001UService;

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

@RestController
@RequestMapping("/cw/cw1505")
public class CW15050001UController {
    private final CW15050001UService service;

    public CW15050001UController(CW15050001UService service) {
        this.service = service;
    }

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

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