package com.njcn.mapper.user;

import com.njcn.pojo.user.Permission;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface PermissionMapper extends Mapper<Permission> {

	List<Permission> queryPermissionByRoleIndex(@Param("roleIndex")String roleIndex, @Param("sysType")String sysType);

	List<Permission> queryPermissionByTwoIndex(@Param("roleIndex")String roleIndex, @Param("sysType")String sysType,@Param("node")Integer node);

	List<String> queryPermissionsByRoleIndex(String roleIndex);

	void removeByIndex(@Param("roleIndex")String roleIndex, @Param("permissionIndex")String string);

	void addByIndex(@Param("roleIndex")String roleIndex, @Param("permissionIndex")String string);

	List<Permission> quarrAll(@Param("nodeIndex")Integer nodeIndex,@Param("parentIndex") Integer parentIndex,@Param
			("sysType")String sysType);

}
