示例#1
0
        /// <summary>获得权限json
        /// </summary>
        /// <param name="rightIdList"></param>
        /// <returns></returns>
        public List <RightEntity> GetRights(List <int> rightIdList)
        {
            if (rightIdList == null || !rightIdList.Any())
            {
                return(null);
            }
            rightIdList = rightIdList.Distinct().ToList();
            RightDal rightDal      = new RightDal();
            var      rightEntities = rightDal.GetRights(string.Join(",", rightIdList));
            var      rootEntities  = rightEntities.Where(m => m.ParentId == 0);

            return(rootEntities == null ? null : rootEntities.ToList());
        }
示例#2
0
        /// <summary>获得权限列表
        /// </summary>
        /// <param name="category">插件Id</param>
        /// <returns></returns>
        public List <RightEntity> GetRights(int category)
        {
            RightDal rightDal = new RightDal();

            return(rightDal.GetRights(category));
        }