package com.palmnest.dao;

import com.palmnest.model.AppMenu;

import java.util.List;

/**
 * 系统菜单管理底层DAO接口
 *
 * @author yb
 * @since 2014-05-28
 */
public interface AppMenuDao extends GenericDao<AppMenu, Integer> {

	public List<AppMenu> getAll2();

	public List<AppMenu> getAllAppMenu();

	/**
	 * 查询菜单总数
	 *
	 * @return
	 */
	public int menuTotalCount();

	/**
	 * 查询菜单的id最多值
	 *
	 * @return
	 */
	public int maxMenuId();

	/**
	 * 查询菜单
	 *
	 * @param treeCode   节点code
	 * @param parentCode 父节点code
	 * @return
	 */
	public AppMenu getMenu(String treeCode, String parentCode);

	/**
	 * 删除菜单
	 *
	 * @param treeCode   节点code
	 * @param parentCode 父节点code
	 */
	public void deleMenu(String treeCode, String parentCode);

	public List<AppMenu> getMenuByParent(String parentCode);

	/**
	 * 根据功能id查询菜单列表
	 *
	 * @param funIds
	 * @return
	 */
	public List<AppMenu> getMenuByFunid(String funIds);

	/**
	 * 获取一级菜单列表
	 *
	 * @return
	 */
	public List<AppMenu> getLevelOneMenu();
}
