package sgc.portal.com.com.web;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.com.model.Menu;
import sgc.portal.com.com.service.ComMenuMngService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

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

/**********************************************************
 * 시스템명  	: 시스템관리(COM)
 * 프로그램ID	: ComMenuMngController
 * 프로그램명	: 메뉴 관리 Controller
 * @author	: SBK
 * @version	: 2023-07-25
 * @since JDK1.8
 * @see
 * 1. 최초 작성
**********************************************************/

@RestController
public class ComMenuMngController {

	@Autowired
	private ComMenuMngService comMenuMngService;

    @PostMapping(value = "/com/com/selectComMenuMngList")
    public List<EasyHashMap<String, Object>> selectComMenuMngList(@RequestBody Menu mn) {
        return comMenuMngService.selectComMenuMngList(mn);
    }

    @PostMapping(value = "/com/com/selectComMenuMng")
    public List<EasyHashMap<String, Object>> selectComMenuMng(@RequestBody Menu mn) {
        return comMenuMngService.selectComMenuMng(mn);
    }

    @PostMapping(value = "/com/com/saveComMenuMng")
    public void saveComMenuMng(@RequestBody List<Menu> mns) {
        comMenuMngService.saveComMenuMng(mns);
    }

    @PostMapping(value = "com/com/deleteComMenuMng")
    public Map<String,String> deleteComMenuMng(@RequestBody Menu mn) {
        return comMenuMngService.deleteComMenuMng(mn);
    }


}
