package sgc.portal.cs.cs0301.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cs.cs0301.dto.CS03010001PSearch;
import sgc.portal.cs.cs0301.model.CS03010001P;
import sgc.portal.cs.cs0301.service.CS03010001PService;

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

@RestController
@RequestMapping("/cs/cs0301")
public class CS03010001PController {
    private final CS03010001PService service;

    public CS03010001PController(CS03010001PService service) {
        this.service = service;
    }
    
    @PostMapping("/CS03010001P/getList")
    public List<EasyHashMap<String, Object>> getList(@RequestBody CS03010001PSearch search) {
        return service.getList(search);
    }
    
    @PostMapping("/CS03010001P/getListModify")
    public EasyHashMap<String, Object> getListModify(@RequestBody CS03010001PSearch search) {
        return service.getListModify(search);
    }

    @PostMapping("/CS03010001P/save")
    public Map<String, Object> save(@RequestBody CS03010001P CS03010001P) {
    	return service.save(CS03010001P);
    }
    
    @PostMapping("/CS03010001P/delete")
    public Map<String, String> delete(@RequestBody CS03010001P CS03010001P) {
    	return service.delete(CS03010001P);
    }
    
    @PostMapping("/CS03010001P/saveDeftElpsSms")
    public Map<String, String> saveDeftElpsSms(@RequestBody CS03010001P CS03010001P) {
    	return service.saveDeftElpsSms(CS03010001P);
    }
}
