package sgc.portal.cw.cw0104.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0104.dto.CW01040001USearch;
import sgc.portal.cw.cw0104.model.CW01040001U;
import sgc.portal.cw.cw0104.service.CW01040001UService;

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

@RestController
@RequestMapping("/cw/cw0104")
public class CW01040001UController {
    private final CW01040001UService service;

    public CW01040001UController(CW01040001UService service) {
        this.service = service;
    }

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

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