package sgc.portal.cw.cw1001.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.cw.cw1001.dto.CW10010001USearch;
import sgc.portal.cw.cw1001.model.CW10010001U;
import sgc.portal.cw.cw1001.service.CW10010001UService;

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

@RestController
@RequestMapping("/cw/cw1001")
public class CW10010001UController {
	
    private final CW10010001UService service;

    public CW10010001UController(CW10010001UService service) {
        this.service = service;
    }

    @PostMapping("/CW10010001U/selectSiteAddress")
    public List<EasyHashMap<String, Object>> selectSiteAddress(@RequestBody CW10010001USearch search) {
        return service.selectSiteAddress(search);
    }

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