package sgc.portal.cw.cw1601.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1601.model.CW16010001U;
import sgc.portal.cw.cw1601.dto.CW16010001USearch;
import sgc.portal.cw.cw1601.service.CW16010001UService;

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

@RestController
@RequestMapping("/cw/cw1601")
public class CW16010001UController {
    private final CW16010001UService service;

    public CW16010001UController(CW16010001UService service) {
        this.service = service;
    }

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

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