package sgc.portal.cw.cw1303.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1303.dto.CW13030001USearch;
import sgc.portal.cw.cw1303.model.CW13030001U;
import sgc.portal.cw.cw1303.service.CW13030001UService;

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

@RestController
@RequestMapping("/cw/cw1303")
public class CW13030001UController {
    private final CW13030001UService service;

    public CW13030001UController(CW13030001UService service) {
        this.service = service;
    }

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

    @PostMapping("/CW13030001U/content")
    public List<EasyHashMap<String, Object>> getContent(@RequestBody CW13030001USearch search) {
        return service.getContent(search);
    }

    @PostMapping("/CW13030001U/check")
    public List<EasyHashMap<String, Object>> checkResiNo(@RequestBody CW13030001USearch search) {
        return service.checkResiNo(search);
    }

    @PostMapping("/CW13030001U/agree")
    public Map<String, String> approve(@RequestBody List<CW13030001U> CW13030001U) {
    	return service.agree(CW13030001U);
    }
}
