package sgc.portal.cw.cw0601.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0601.dto.CW06010001USearch;
import sgc.portal.cw.cw0601.model.CW06010001U;
import sgc.portal.cw.cw0601.service.CW06010001UService;

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

@RestController
@RequestMapping("/cw/cw0601")
public class CW06010001UController {
	
    private final CW06010001UService service;

    public CW06010001UController(CW06010001UService service) {
        this.service = service;
    }

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

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

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

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