1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using Attribute;
- using Dto;
- using Vo;
- using Model;
- using Model.Base;
- using Repository;
- using Service;
- using Microsoft.AspNetCore.Mvc;
- namespace Services.Client
- {
- /// <summary>
- /// 资源文件更新信息Service业务层处理
- /// </summary>
- [AppService(ServiceType = typeof(IFileUpdateInfoService), ServiceLifetime = LifeTime.Transient)]
- public class FileUpdateInfoService : BaseService<FileUpdateInfo>, IFileUpdateInfoService
- {
- /// <summary>
- /// APP-静态资源
- /// </summary>
- /// <param name="parm">请求参数</param>
- /// <returns>APP静态资源</returns>
- public PagedInfo<AppStaticFilesVo> StaticFiles([FromQuery] AppStaticFilesDto parm)
- {
- PagerInfo page = new PagerInfo();
- page.pageSize = 100000;
- //开始拼装查询条件
- var predicate = Expressionable.Create<FileUpdateInfo>();
- predicate = predicate.And(m => m.appVersion == parm.appVersion);
- predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<FileUpdateInfo, AppStaticFilesVo>(page);
- return response;
- }
- }
- }
|