123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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(IPriRecursionStartTableService), ServiceLifetime = LifeTime.Transient)]
- public class PriRecursionStartTableService : BaseService<PriRecursionStartTable>, IPriRecursionStartTableService
- {
- /// <summary>
- /// 递归开始条件对象表-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetPriRecursionStartTableListVo> getPriRecursionStartTableList([FromQuery] PagerInfo page, [FromQuery] PriRecursionStartTable param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriRecursionStartTable>();
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.tableEnName), m => m.tableEnName.Contains(param.tableEnName));
- predicate = predicate.AndIF(param.listId > 0, m => m.listId == param.listId);
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriRecursionStartTable, GetPriRecursionStartTableListVo>(page);
- return response;
- }
- /// <summary>
- /// 递归开始条件对象表-下拉框数据
- /// </summary>
- /// <param name="page">分页参数</param>
- /// <returns>下拉框数据</returns>
- public PagedInfo<GetPriRecursionStartTableDicVo> getPriRecursionStartTableDic([FromQuery] PagerInfo page)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriRecursionStartTable>();
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriRecursionStartTable, GetPriRecursionStartTableDicVo>(page);
- return response;
- }
- }
- }
|