| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using Attribute;
- using Model;
- using Model.Base;
- using Repository;
- using Service;
- using Microsoft.AspNetCore.Mvc;
- using Vo.Admin;
- namespace Services
- {
- /// <summary>
- /// 资源版本配置Service业务层处理
- /// </summary>
- [AppService(ServiceType = typeof(IAppSourceVersionService), ServiceLifetime = LifeTime.Transient)]
- public class AppSourceVersionService : BaseService<AppSourceVersion>, IAppSourceVersionService
- {
- /// <summary>
- /// 资源版本配置-列表
- /// </summary>
- /// <param name="sourceId">所属资源ID</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetAppSourceVersionListVo> getAppSourceVersionList([FromQuery] PagerInfo page, int sourceId)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<AppSourceVersion>();
- predicate = predicate.AndIF(sourceId > 0, m => m.sourceId == sourceId);
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<AppSourceVersion, GetAppSourceVersionListVo>(page);
- return response;
- }
- }
- }
|