1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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(IPriRecursionEndFieldService), ServiceLifetime = LifeTime.Transient)]
- public class PriRecursionEndFieldService : BaseService<PriRecursionEndField>, IPriRecursionEndFieldService
- {
- /// <summary>
- /// 递归停止条件字段-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetPriRecursionEndFieldListVo> getPriRecursionEndFieldList([FromQuery] PagerInfo page, [FromQuery] PriRecursionEndField param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriRecursionEndField>();
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.fieldName), m => m.fieldName.Contains(param.fieldName));
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.fieldEnName), m => m.fieldEnName.Contains(param.fieldEnName));
- predicate = predicate.AndIF(param.objectTableId > 0, m => m.objectTableId == param.objectTableId);
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriRecursionEndField, GetPriRecursionEndFieldListVo>(page);
- return response;
- }
- }
- }
|