public async Task <string> GetRoleRightsAsync([FromQuery] RoleRightParam param)
        {
            var rights = await _iTRightRepository.QueryAsync();

            var roleRight = new List <TRoleRightRelation>();

            if (param.RoleId != null)
            {
                roleRight = await _iTRoleRepository.GetRoleRightsAsync(param.RoleId.Value);
            }
            var roleRightDtos = new List <RoleRightDto>();

            foreach (var item in rights)
            {
                var roleRightDto = new RoleRightDto
                {
                    Id        = item.Id,
                    RightName = item.RightName,
                    IsAdd     = false
                };

                if (roleRight.Exists(c => c.RightId == item.Id))
                {
                    roleRightDto.IsAdd = true;
                }
                roleRightDtos.Add(roleRightDto);
            }

            var pageData = new LayuiTableDto <RoleRightDto>
            {
                Code  = "0",
                Msg   = "获取数据成功",
                Count = roleRightDtos.Count,
                Data  = roleRightDtos
            };
            var json = JsonConvert.SerializeObject(pageData);

            return(json);
        }
        public async Task <ApiRequestResult> QueryAsync()
        {
            var result = await _iTRightRepository.QueryAsync();

            return(ApiRequestResult.Success(result, ""));
        }