/// <summary>
        /// 获取授权账号集合
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task <List <SysApiAccountData> > GetSysApiAccountList(SysApiAccountData model)
        {
            var queryable = _sysApiAccountRepository.GetAll();

            if (!string.IsNullOrEmpty(model.UserName))
            {
                queryable.Where(w => w.UserName.Contains(model.UserName));
            }
            List <SysApiAccountData> list = ObjectMapper.Map <List <SysApiAccountData> >(queryable.ToList());

            return(Task.FromResult(list));
        }
        /// <summary>
        /// 获取授权账号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task <SysApiAccountData> GetSysApiAccount(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(Task.FromResult <SysApiAccountData>(null));
            }
            var data = _sysApiAccountRepository.Get(Guid.Parse(id));
            SysApiAccountData model = ObjectMapper.Map <SysApiAccountData>(data);
            //获取关联的客户
            var linkData = _sysApiClienToAccountRepository.GetAllList(w => w.ApiAccountId == Guid.Parse(id));

            if (linkData.Any())
            {
                model.ApiClientId = linkData[0].ApiClientId;
            }
            return(Task.FromResult(model));
        }
        public async Task <JsonResult> GetSysApiAccountList([FromBody] SysApiAccountData model)
        {
            var list = await _sysApiAccountAppService.GetSysApiAccountList(model);

            return(Json(list));
        }