package com.oqpo.api.mapper.system;

import com.oqpo.api.entity.oper.MemberEntity;
import com.oqpo.api.entity.oper.MenuEntity;
import com.oqpo.api.web.dto.request.GridRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MenuMapper {

    List<MenuEntity> selectUserAuthMenuList(MemberEntity memberEntity) throws Exception;
    List<MenuEntity> selectAuthMenuList(MemberEntity memberEntity) throws Exception;
    List<MenuEntity> selectAuthSubMenuList(MenuEntity menuEntity, MemberEntity memberEntity);

    List<MenuEntity> selectAllMenuList() throws Exception;
    MenuEntity selectMenuInfo(@Param("menuNo") String menuNo) throws Exception;

    int insertMenu(@Param("userId") String userId, MenuEntity entity) throws Exception;
    int updateMenu(@Param("userId") String userId, MenuEntity entity) throws Exception;
    int deleteMenu(@Param("menuNo") String menuNo) throws Exception;

    String selectMenuIdDupYn(@Param("menuId") String menuId) throws Exception;

    List<MenuEntity> selectTopMenuList() throws Exception;

    List<MenuEntity> selectBottomMenuList(@Param("topMenuNo") Integer topMenuNo, @Param("authNo") String authNo) throws Exception;

    List<MenuEntity> selectPopMenuList(@Param("sTopMenuNo") String sTopMenuNo, @Param("sMenuNm") String sMenuNm, GridRequest gridRequest) throws Exception;
    int selectPopMenuCnt(@Param("sTopMenuNo") String sTopMenuNo, @Param("sMenuNm") String sMenuNm) throws Exception;

    List<MenuEntity> selectMobleMenuList() throws Exception;

}
