package sgc.portal.cw.cw0603.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0603.dto.CW06030001USearch;
import sgc.portal.cw.cw0603.model.CW06030001U;
import sgc.portal.cw.cw0603.service.CW06030001UService;

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

@RestController
@RequestMapping("/cw/cw0603")
public class CW06030001UController {
    private final CW06030001UService service;

    public CW06030001UController(CW06030001UService service) {
        this.service = service;
    }

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