package sgc.portal.cw.cw0625.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0625.dto.CW06250001USearch;
import sgc.portal.cw.cw0625.model.CW06250001U;
import sgc.portal.cw.cw0625.service.CW06250001UService;

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

@RestController
@RequestMapping("/cw/cw0625")
public class CW06250001UController {
    private final CW06250001UService service;

    public CW06250001UController(CW06250001UService service) {
        this.service = service;
    }

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

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