package sgc.portal.cw.cw1501.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1501.model.CW15010001U;
import sgc.portal.cw.cw1501.dto.CW15010001USearch;
import sgc.portal.cw.cw1501.service.CW15010001UService;

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

@RestController
@RequestMapping("/cw/cw1501")
public class CW15010001UController {
    private final CW15010001UService service;

    public CW15010001UController(CW15010001UService service) {
        this.service = service;
    }

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

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