package com.reyun.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.reyun.model.RoleCategory;
@Transactional
public interface RoleCategoryRepository extends JpaRepository<RoleCategory, Long> {

	@Query(value="select * from role_category",nativeQuery=true)
	List<RoleCategory> listAllRoleCategory();
	
	@Query(value="select * from role_category where role = ?1",nativeQuery=true)
	List<RoleCategory> listMenuAuthByRole(int role);
}
