PriPrizeInSetService.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Attribute;
  2. using Model;
  3. using Model.Base;
  4. using Repository;
  5. using Service;
  6. using Microsoft.AspNetCore.Mvc;
  7. using Vo.Admin;
  8. namespace Services
  9. {
  10. /// <summary>
  11. /// 奖励入口配置表Service业务层处理
  12. /// </summary>
  13. [AppService(ServiceType = typeof(IPriPrizeInSetService), ServiceLifetime = LifeTime.Transient)]
  14. public class PriPrizeInSetService : BaseService<PriPrizeInSet>, IPriPrizeInSetService
  15. {
  16. /// <summary>
  17. /// 奖励入库表-列表
  18. /// </summary>
  19. /// <param name="param">参数请求体</param>
  20. /// <param name="page">分页参数</param>
  21. /// <returns>列表</returns>
  22. public PagedInfo<GetPriPrizeInSetListVo> getPriPrizeInSetList([FromQuery] PagerInfo page, [FromQuery] PriPrizeInSet param)
  23. {
  24. //拼装查询条件
  25. var predicate = Expressionable.Create<PriPrizeInSet>();
  26. predicate = predicate.AndIF(param.projectId > 0, m => m.projectId == param.projectId);
  27. var response = Queryable()
  28. .Where(predicate.ToExpression())
  29. .OrderByDescending(m => m.id)
  30. .ToPage<PriPrizeInSet, GetPriPrizeInSetListVo>(page);
  31. return response;
  32. }
  33. }
  34. }