package sgc.portal.ei.ei0202.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 sgc.portal.base.util.EasyHashMap;
import sgc.portal.ei.ei0202.dto.EI02020001USearch;
import sgc.portal.ei.ei0202.model.EI02020001U;
import sgc.portal.ei.ei0202.service.EI02020001UService;

@RestController
@RequestMapping("/ei/ei0202")
public class EI02020001UController {
	private final EI02020001UService service;

	public EI02020001UController(EI02020001UService service) {
		this.service = service;
	}
	//조회
	@PostMapping("/EI02020001U/list")
	public List<EasyHashMap<String, Object>> getList(@RequestBody EI02020001USearch search) {
		return service.getList(search);
	}
	
	//저장
	@PostMapping("/EI02020001U/save")
	public Map<String, String> save(@RequestBody List<EI02020001U> eI02020001U) {
		return service.save(eI02020001U);
	}
	
	//복사
	@PostMapping("/EI02020001U/copy")
	public Map<String, String> copy(@RequestBody EI02020001USearch search) {
		return service.copy(search);
	}

}
