package sgc.portal.cw.cw0807.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0807.dto.CW08070001USearch;
import sgc.portal.cw.cw0807.model.CW08070001U;
import sgc.portal.cw.cw0807.service.CW08070001UService;

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

@RestController
@RequestMapping("/cw/cw0807")
public class CW08070001UController {
    private final CW08070001UService service;

    public CW08070001UController(CW08070001UService service) {
        this.service = service;
    }

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

    @PostMapping("/CW08070001U/list2")
    public List<EasyHashMap<String, Object>> getList2(@RequestBody CW08070001USearch search) {
        return service.getList2(search);
    }

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

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