package sgc.portal.cw.cw0627.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0627.dto.CW06270001USearch;
import sgc.portal.cw.cw0627.model.CW06270001U;
import sgc.portal.cw.cw0627.service.CW06270001UService;

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

@RestController
@RequestMapping("/cw/cw0627")
public class CW06270001UController {
    private final CW06270001UService service;

    public CW06270001UController(CW06270001UService service) {
        this.service = service;
    }

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

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