using System;
using System.Threading.Tasks;
using RiskControl.NewService.Entity.RiskControlRR;
using RiskControl.NewService.Extension;
using SqlSugar;
namespace RiskControl.NewService.Service
{
///
/// 支付订单
///
public class PayOrderService :BaseService
{
public async Task> GetPages(int pageIndex, int pageSize, string orderNo, int CreateUserId
, DateTime? startTime, DateTime? endTime, EnumPayment? payment)
{
var whereExp = Expressionable.Create()
.AndIF(!string.IsNullOrWhiteSpace(orderNo), a => a.OrderNo == orderNo)
.AndIF(CreateUserId > 0, a => a.CreateUserId == CreateUserId)
.AndIF(startTime != null, a => a.CreateTime >= startTime)
.AndIF(endTime != null, a => a.CreateTime <= endTime)
.AndIF(payment != null, a => a.Payment == payment)
.ToExpression();
var res = await RiskControlRRDb.Queryable()
.Includes(a => a.CreateUser)
.Where(whereExp)
.OrderBy(a=>a.CreateTime,OrderByType.Desc)
.ToPageAsync(1, 20);
return res;
}
///
/// 记录支付异常信息
///
///
///
public async Task LogPayError(PayErrLog log)
{
await RiskControlRRDb.Insertable(log).ExecuteCommandAsync();
}
}
///
/// 支付金额
///
public class PayRechargeAmountService : BaseService
{
}
}