package sgc.portal.co.co0102.web;

import org.springframework.web.bind.annotation.*;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.co.co0102.dto.CO01020001USearch;
import sgc.portal.co.co0102.model.CO01020001U;
import sgc.portal.co.co0102.service.CO01020001UService;

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

@RestController
@RequestMapping("/co/co0102")
public class CO01020001UController {
    private final CO01020001UService service;

    public CO01020001UController(CO01020001UService service) {
        this.service = service;
    }

    @PostMapping("/CO01020001U/list")
    public List<EasyHashMap<String, Object>> getList(@RequestBody CO01020001USearch search) {
        return service.getList(search);
    }
    
    @PostMapping("/CO01020001U/save")
    public Map<String, String> save(@RequestBody List<CO01020001U> cO01020001U) {
    	return service.save(cO01020001U);
    }
    
}
