12345678910111213141516171819202122232425262728293031323334353637383940 |
- 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(IPriRecursionStartConditionService), ServiceLifetime = LifeTime.Transient)]
- public class PriRecursionStartConditionService : BaseService<PriRecursionStartCondition>, IPriRecursionStartConditionService
- {
- /// <summary>
- /// 递归开始条件-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetPriRecursionStartConditionListVo> getPriRecursionStartConditionList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartCondition param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriRecursionStartCondition>();
- predicate = predicate.AndIF(param.loopSetId > 0, m => m.loopSetId == param.loopSetId);
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.fieldQueryModel), m => m.fieldQueryModel.Contains(param.fieldQueryModel));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriRecursionStartCondition, GetPriRecursionStartConditionListVo>(page);
- return response;
- }
- }
- }
|