Пример #1
0
        public async Task <MemberDto> GetMemberAsync(Int32 userId, Int32 memberId, Boolean isFolder)
        {
            Check.IfNullOrZero(userId);
            Check.IfNullOrZero(memberId);
            var result = await _memberContext.GetMemberAsync(userId, memberId, isFolder);

            if (result == null)
            {
                throw new BusinessException($"未能查找到所请求的应用");
            }

            return(new MemberDto
            {
                AppId = result.AppId,
                AppUrl = result.AppUrl,
                DeskIndex = result.DeskIndex,
                FolderId = result.FolderId,
                Height = result.Height,
                IconUrl = result.IconUrl,
                Id = result.Id,
                IsFlash = result.IsFlash,
                IsOnDock = result.IsOnDock,
                IsOpenMax = result.IsOpenMax,
                IsResize = result.IsResize,
                IsSetbar = result.IsSetbar,
                MemberType = result.MemberType,
                Name = result.Name,
                Width = result.Width,
                UserId = result.UserId,
                IsIconByUpload = result.IsIconByUpload,
                StarCount = result.StarCount
            });
        }