package sgc.portal.cw.cw1603.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1603.model.CW16030001U;
import sgc.portal.cw.cw1603.dto.CW16030001USearch;
import sgc.portal.cw.cw1603.service.CW16030001UService;

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

@RestController
@RequestMapping("/cw/cw1603")
public class CW16030001UController {
    private final CW16030001UService service;

    public CW16030001UController(CW16030001UService service) {
        this.service = service;
    }

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

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