AppBottomNavsService.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Attribute;
  2. using Dto;
  3. using Vo;
  4. using Model;
  5. using Model.Base;
  6. using Repository;
  7. using Service;
  8. using Microsoft.AspNetCore.Mvc;
  9. namespace Services.Client
  10. {
  11. /// <summary>
  12. /// app底部导航Service业务层处理
  13. /// </summary>
  14. [AppService(ServiceType = typeof(IAppBottomNavsService), ServiceLifetime = LifeTime.Transient)]
  15. public class AppBottomNavsService : BaseService<AppBottomNavs>, IAppBottomNavsService
  16. {
  17. /// <summary>
  18. /// APP-底部导航列表
  19. /// </summary>
  20. /// <param name="parm">请求参数</param>
  21. /// <returns>APP底部导航列表</returns>
  22. public PagedInfo<AppAppBottomNavsVo> AppBottomNavs([FromQuery] AppAppBottomNavsDto parm)
  23. {
  24. //开始拼装查询条件
  25. var predicate = Expressionable.Create<AppBottomNavs>();
  26. predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.kind), m => m.kind.Contains(parm.kind));
  27. var response = Queryable()
  28. .Where(predicate.ToExpression())
  29. .OrderBy(m => m.id)
  30. .ToPage<AppBottomNavs, AppAppBottomNavsVo>(new PagerInfo());
  31. return response;
  32. }
  33. }
  34. }