package sgc.portal.cw.cw1401.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1401.dto.CW14010001USearch;
import sgc.portal.cw.cw1401.model.CW14010001U;
import sgc.portal.cw.cw1401.service.CW14010001UService;

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

@RestController
@RequestMapping("/cw/cw1401")
public class CW14010001UController {
    private final CW14010001UService service;

    public CW14010001UController(CW14010001UService service) {
        this.service = service;
    }

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

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