12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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(IPriPrizeInTableService), ServiceLifetime = LifeTime.Transient)]
- public class PriPrizeInTableService : BaseService<PriPrizeInTable>, IPriPrizeInTableService
- {
- /// <summary>
- /// 奖励入库表-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetPriPrizeInTableListVo> getPriPrizeInTableList([FromQuery] PagerInfo page, [FromQuery] PriPrizeInTable param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriPrizeInTable>();
- predicate = predicate.AndIF(param.listId > 0, m => m.listId == param.listId);
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.tableEnName), m => m.tableEnName.Contains(param.tableEnName));
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.excuteKind), m => m.excuteKind.Contains(param.excuteKind));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriPrizeInTable, GetPriPrizeInTableListVo>(page);
- return response;
- }
- /// <summary>
- /// 奖励入库表-下拉框数据
- /// </summary>
- /// <param name="page">分页参数</param>
- /// <returns>下拉框数据</returns>
- public PagedInfo<GetPriPrizeInTableDicVo> getPriPrizeInTableDic([FromQuery] PagerInfo page)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<PriPrizeInTable>();
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<PriPrizeInTable, GetPriPrizeInTableDicVo>(page);
- return response;
- }
- }
- }
|