package sgc.portal.ei.ei0101.web;

import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.ei.ei0101.dto.EI01010001USearch;
import sgc.portal.ei.ei0101.model.EI01010001U;
import sgc.portal.ei.ei0101.service.EI01010001UService;

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

@RestController
@RequestMapping("/ei/ei0101")
public class EI01010001UController {
    private final EI01010001UService service;

    public EI01010001UController(EI01010001UService service) {
        this.service = service;
    }
    
    /*
     * 조회 LIST
     */
    @PostMapping("/EI01010001U/list")
    public List<EasyHashMap<String, Object>> getList(@RequestBody EI01010001USearch search) {
        return service.getList(search);
    }
    
    /*
     * SAVE LIST
     */
    @PostMapping("/EI01010001U/save")
    public Map<String, String> save(@RequestBody List<EI01010001U> eI01010001U) {
    	return service.save(eI01010001U);
    }
    
}
