package sgc.portal.ei.ei0104.web;

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

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.ei.ei0104.dto.EI01040001USearch;
import sgc.portal.ei.ei0104.model.EI01040001U;
import sgc.portal.ei.ei0104.service.EI01040001UService;

@Slf4j
@RestController
@RequestMapping("/ei/ei0104")
public class EI01040001UController {
    private final EI01040001UService service;

    public EI01040001UController(EI01040001UService service) {
        this.service = service;
    }
    
    /*
     * 조회 LIST
     */
    @PostMapping("/EI01040001U/list")
    public List<EasyHashMap<String, Object>> getList(@RequestBody EI01040001USearch search) {
    	return service.getList(search);
    }
    
    /*
     * SAVE LIST
     */
    @PostMapping("/EI01040001U/save")
    public Map<String, String> save(@RequestBody List<EI01040001U> eI01040001U) {
    	return service.save(eI01040001U);
    }
    
}
