package sgc.portal.cw.cw1604.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1604.dto.CW16040001USearch;
import sgc.portal.cw.cw1604.model.CW16040001U;
import sgc.portal.cw.cw1604.service.CW16040001UService;

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

@RestController
@RequestMapping("/cw/cw1604")
public class CW16040001UController {
    private final CW16040001UService service;

    public CW16040001UController(CW16040001UService service) {
        this.service = service;
    }

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

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