123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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(IHdUnBindRecordService), ServiceLifetime = LifeTime.Transient)]
- public class HdUnBindRecordService : BaseService<HdUnBindRecord>, IHdUnBindRecordService
- {
- /// <summary>
- /// 好哒终端解绑记录-列表
- /// </summary>
- /// <param name="param">参数请求体</param>
- /// <param name="page">分页参数</param>
- /// <returns>列表</returns>
- public PagedInfo<GetHdUnBindRecordListVo> getHdUnBindRecordList([FromQuery] PagerInfo page, [FromQuery] HdUnBindRecord param)
- {
- //拼装查询条件
- var predicate = Expressionable.Create<HdUnBindRecord>();
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.snNo), m => m.snNo.Contains(param.snNo));
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.mchtNo), m => m.mchtNo.Contains(param.mchtNo));
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.oprTime), m => m.oprTime.Contains(param.oprTime));
- predicate = predicate.AndIF(!string.IsNullOrEmpty(param.deviceType), m => m.deviceType.Contains(param.deviceType));
- var response = Queryable()
- .Where(predicate.ToExpression())
- .OrderByDescending(m => m.id)
- .ToPage<HdUnBindRecord, GetHdUnBindRecordListVo>(page);
- return response;
- }
- }
- }
|