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(IPriPrizeObjectTableService), ServiceLifetime = LifeTime.Transient)]
- public class PriPrizeObjectTableService : BaseService<PriPrizeObjectTable>, IPriPrizeObjectTableService
- {
- /// <summary>
- /// 奖励发放对象表-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetPriPrizeObjectTableListVo> getPriPrizeObjectTableList([FromQuery] PagerInfo page, [FromQuery] PriPrizeObjectTable param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriPrizeObjectTable>();
- predicate = predicate.AndIF(param.projectId > 0, m => m.projectId == param.projectId);
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.tableEnName), m => m.tableEnName.Contains(param.tableEnName));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriPrizeObjectTable, GetPriPrizeObjectTableListVo>(page);
- return response;
- }
- /// <summary>
- /// 奖励发放对象表-下拉框数据
- /// </summary>
- /// <param name="page">分页参数</param>
- /// <returns>下拉框数据</returns>
- public PagedInfo<GetPriPrizeObjectTableDicVo> getPriPrizeObjectTableDic([FromQuery] PagerInfo page)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriPrizeObjectTable>();
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriPrizeObjectTable, GetPriPrizeObjectTableDicVo>(page);
- return response;
- }
- }
- }
|