package sgc.portal.cw.cw0607.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw0607.model.CW06070001U;
import sgc.portal.cw.cw0607.dto.CW06070001USearch;
import sgc.portal.cw.cw0607.service.CW06070001UService;

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

@RestController
@RequestMapping("/cw/cw0607")
public class CW06070001UController {
    private final CW06070001UService service;

    public CW06070001UController(CW06070001UService service) {
        this.service = service;
    }

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

    @PostMapping("/CW06070001U/getInitData")
    public List<EasyHashMap<String, Object>> getInitData(@RequestBody CW06070001USearch search) {
        return service.getInitData(search);
    }

    @PostMapping("/CW06070001U/selectInitData")
    public List<EasyHashMap<String, Object>> selectInitData(@RequestBody CW06070001USearch search) {
        return service.selectInitData(search);
    }
    
    @PostMapping("/CW06070001U/save")
    public Map<String, String> save(@RequestBody List<CW06070001U> CW06070001U) {
    	return service.save(CW06070001U);
    }
    
    @PostMapping("/CW06070001U/mail")
    public Map<String, String> mail(@RequestBody List<CW06070001U> CW06070001U) {
    	return service.sendMail(CW06070001U);
    }
}
