Example #1
0
        public async Task <IResultModel> Query(FileQueryModel model)
        {
            var result = new QueryResultModel <FileEntity>
            {
                Rows  = await _repository.Query(model),
                Total = model.TotalCount
            };

            foreach (var entity in result.Rows)
            {
                entity.Url = _fileStorageProvider.GetUrl(entity.FullPath, entity.AccessMode);
            }
            return(ResultModel.Success(result));
        }
Example #2
0
        public IResultModel UI()
        {
            var result = _service.GetUI();

            result.System.Logo = _fileStorageProvider.GetUrl(result.System.Logo);
            return(ResultModel.Success(result));
        }