package sgc.portal.cw.cw1402.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1402.model.CW14020001U;
import sgc.portal.cw.cw1402.dto.CW14020001USearch;
import sgc.portal.cw.cw1402.service.CW14020001UService;

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

@RestController
@RequestMapping("/cw/cw1402")
public class CW14020001UController {
    private final CW14020001UService service;

    public CW14020001UController(CW14020001UService service) {
        this.service = service;
    }

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

    @PostMapping("/CW14020001U/resortList")
    public List<EasyHashMap<String, Object>> getList2(@RequestBody CW14020001USearch search) {
        return service.getList2(search);
    }

    @PostMapping("/CW14020001U/resortInfo")
    public List<EasyHashMap<String, Object>> getList3(@RequestBody CW14020001USearch search) {
        return service.getList3(search);
    }

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