| | |
| | | from b in temp.DefaultIfEmpty() |
| | | select new LifePayOrderListOutput |
| | | { |
| | | DiscountAmount = a.DiscountAmount, |
| | | DiscountAmount = a.DiscountAmount ?? 0, |
| | | FinishTime = a.FinishTime, |
| | | Id = a.Id, |
| | | LifePayOrderStatus = a.LifePayOrderStatus, |
| | | LifePayOrderStatus = a.LifePayOrderStatus?? 0, |
| | | LifePayOrderType = a.LifePayOrderType, |
| | | LifePayType = a.LifePayType, |
| | | OrderNo = a.OrderNo, |
| | | PayAmount = a.PayAmount, |
| | | PayAmount = a.PayAmount ?? 0, |
| | | PhoneNumber = a.PhoneNumber, |
| | | RechargeAmount = a.RechargeAmount, |
| | | RechargeAmount = a.RechargeAmount??0, |
| | | UserId = a.UserId, |
| | | OutOrderNo = a.OutOrderNo, |
| | | PayStatus = a.PayStatus, |
| | | PayStatus = a.PayStatus?? 0, |
| | | PayTime = a.PayTime, |
| | | ACOOLYOrderNo = a.ACOOLYOrderNo, |
| | | RefundCredentialsImgUrl = a.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | from b in temp.DefaultIfEmpty() |
| | | select new LifePayOrderListOutput |
| | | { |
| | | DiscountAmount = a.DiscountAmount, |
| | | DiscountAmount = a.DiscountAmount ?? 0, |
| | | FinishTime = a.FinishTime, |
| | | Id = a.Id, |
| | | LifePayOrderStatus = a.LifePayOrderStatus, |
| | | LifePayOrderStatus = a.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = a.LifePayOrderType, |
| | | LifePayType = a.LifePayType, |
| | | OrderNo = a.OrderNo, |
| | | PayAmount = a.PayAmount, |
| | | PayAmount = a.PayAmount ?? 0, |
| | | PhoneNumber = a.PhoneNumber, |
| | | RechargeAmount = a.RechargeAmount, |
| | | RechargeAmount = a.RechargeAmount ?? 0, |
| | | UserId = a.UserId, |
| | | OutOrderNo = a.OutOrderNo, |
| | | PayStatus = a.PayStatus, |
| | | PayStatus = a.PayStatus ?? 0, |
| | | PayTime = a.PayTime, |
| | | ACOOLYOrderNo = a.ACOOLYOrderNo, |
| | | RefundCredentialsImgUrl = a.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在"); |
| | | var user = await _lifePayUserRepository.FirstOrDefaultAsync(x => x.Id == order.UserId); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(user == null, "用户不存在"); |
| | | var orderpirce = await GetOrderPrice(order.RechargeAmount, order.PayAmount, order.PlatformRate ?? 0, order.ChannleRate ?? 0, order.ChannlesRakeRate ?? 0, order.PremiumRate ?? 0); |
| | | |
| | | var orderpirce = await GetOrderPrice(order.RechargeAmount ?? 0, order.PayAmount ?? 0, order.PlatformRate ?? 0, order.ChannleRate ?? 0, order.ChannlesRakeRate ?? 0, order.PremiumRate ?? 0); |
| | | |
| | | var result = new LifePayOrderOutput() |
| | | { |
| | | UserName = user.Name, |
| | | UserPhoneNumber = user.PhoneNumber, |
| | | DiscountAmount = order.DiscountAmount, |
| | | DiscountAmount = order.DiscountAmount ?? 0, |
| | | FinishTime = order.FinishTime, |
| | | Id = order.Id, |
| | | OutOrderNo = order.OutOrderNo, |
| | | LifePayChannle = channle.ChannlesName, |
| | | Status = order.LifePayOrderStatus, |
| | | Status = order.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = order.LifePayOrderType, |
| | | LifePayType = order.LifePayType, |
| | | OrderNo = order.OrderNo, |
| | | PayAmount = order.PayAmount, |
| | | RechargeAmount = order.RechargeAmount, |
| | | PayStatus = order.PayStatus, |
| | | PayAmount = order.PayAmount ?? 0, |
| | | RechargeAmount = order.RechargeAmount ?? 0, |
| | | PayStatus = order.PayStatus ?? 0, |
| | | PayTime = order.PayTime, |
| | | OrderParamDetailJsonStr = order.OrderParamDetailJsonStr, |
| | | RefundCredentialsImgUrl = order.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | { |
| | | UserName = user.Name, |
| | | UserPhoneNumber = user.PhoneNumber, |
| | | DiscountAmount = order.DiscountAmount, |
| | | DiscountAmount = order.DiscountAmount ?? 0, |
| | | FinishTime = order.FinishTime, |
| | | Id = order.Id, |
| | | OutOrderNo = order.OutOrderNo, |
| | | LifePayChannle = channle.ChannlesName, |
| | | Status = order.LifePayOrderStatus, |
| | | Status = order.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = order.LifePayOrderType, |
| | | LifePayType = order.LifePayType, |
| | | OrderNo = order.OrderNo, |
| | | PayAmount = order.PayAmount, |
| | | RechargeAmount = order.RechargeAmount, |
| | | PayStatus = order.PayStatus, |
| | | PayAmount = order.PayAmount ?? 0, |
| | | RechargeAmount = order.RechargeAmount ?? 0, |
| | | PayStatus = order.PayStatus ?? 0, |
| | | PayTime = order.PayTime, |
| | | RefundCredentialsImgUrl = order.RefundCredentialsImgUrl.GetOssPath(), |
| | | CreationTime = order.CreationTime, |
| | |
| | | .Select(x => |
| | | new UserLifePayOrderOutput |
| | | { |
| | | DiscountAmount = x.DiscountAmount, |
| | | DiscountAmount = x.DiscountAmount ?? 0, |
| | | FinishTime = x.FinishTime, |
| | | Id = x.Id, |
| | | LifePayOrderStatus = x.LifePayOrderStatus, |
| | | LifePayOrderStatus = x.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = x.LifePayOrderType, |
| | | LifePayType = x.LifePayType, |
| | | OrderNo = x.OrderNo, |
| | | PayAmount = x.PayAmount, |
| | | RechargeAmount = x.RechargeAmount, |
| | | PayStatus = x.PayStatus, |
| | | PayAmount = x.PayAmount ?? 0, |
| | | RechargeAmount = x.RechargeAmount ?? 0, |
| | | PayStatus = x.PayStatus ?? 0, |
| | | PayTime = x.PayTime, |
| | | OrderParamDetailJsonStr = x.OrderParamDetailJsonStr, |
| | | RefundCredentialsImgUrl = x.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | .Select(x => |
| | | new UserLifePayOrderOutput |
| | | { |
| | | DiscountAmount = x.DiscountAmount, |
| | | DiscountAmount = x.DiscountAmount ?? 0, |
| | | FinishTime = x.FinishTime, |
| | | Id = x.Id, |
| | | LifePayOrderStatus = x.LifePayOrderStatus, |
| | | LifePayOrderStatus = x.LifePayOrderStatus?? 0 , |
| | | LifePayOrderType = x.LifePayOrderType, |
| | | LifePayType = x.LifePayType, |
| | | OrderNo = x.OrderNo, |
| | | PayAmount = x.PayAmount, |
| | | RechargeAmount = x.RechargeAmount, |
| | | PayStatus = x.PayStatus, |
| | | PayAmount = x.PayAmount ?? 0, |
| | | RechargeAmount = x.RechargeAmount ?? 0, |
| | | PayStatus = x.PayStatus ?? 0, |
| | | PayTime = x.PayTime, |
| | | OrderParamDetailJsonStr = x.OrderParamDetailJsonStr, |
| | | RefundCredentialsImgUrl = x.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | public async Task<LifePayStatusEnum> GetPayStatusByOrderNo(string orderNo) |
| | | { |
| | | return await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo) |
| | | .Select(x => x.PayStatus) |
| | | .Select(x => x.PayStatus ?? 0) |
| | | .FirstOrDefaultAsync(); |
| | | } |
| | | |
| | |
| | | OrderNo = x.OrderNo, |
| | | RefundCheckRemark = x.RefundCheckRemark, |
| | | RefundApplyRemark = x.RefundApplyRemark, |
| | | LifePayOrderStatus = x.LifePayOrderStatus, |
| | | LifePayOrderStatus = x.LifePayOrderStatus ?? 0, |
| | | }).FirstOrDefaultAsync(); |
| | | |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "未找到订单信息"); |
| | |
| | | var channle = await GetLifePayChannlesDtoByNum(input.ChannelId); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(channle == null, "渠道不存在"); |
| | | |
| | | var repeatOrder = await _lifePayOrderRepository.Where(x => x.LifePayOrderType == LifePayOrderTypeEnum.话费订单 && x.PayStatus == LifePayStatusEnum.已支付 |
| | | && x.LifePayOrderStatus == LifePayOrderStatusEnum.充值中 && x.OrderParamDetailJsonStr.Contains(input.ProductData.IspCode) |
| | | && x.OrderParamDetailJsonStr.Contains(input.ProductData.Phone)).ToListAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder.Count() > 0, "您有同户号订单正在充值中,请勿重复充值"); |
| | | |
| | | //var rate = await GetRate(); |
| | | //CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "未配置折扣"); |
| | | |
| | |
| | | |
| | | //var rate = await GetRate(); |
| | | //CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "未配置折扣"); |
| | | |
| | | var repeatOrder = await _lifePayOrderRepository.Where(x => x.LifePayOrderType == LifePayOrderTypeEnum.电费订单 && x.PayStatus == LifePayStatusEnum.已支付 |
| | | && x.LifePayOrderStatus == LifePayOrderStatusEnum.充值中 && x.OrderParamDetailJsonStr.Contains(input.ProductData.ElectricType) |
| | | && x.OrderParamDetailJsonStr.Contains(input.ProductData.ElectricAccount)).ToListAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder.Count() > 0, "您有同户号订单正在充值中,请勿重复充值"); |
| | | |
| | | var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.默认电费折扣); |
| | | |
| | |
| | | |
| | | //var rate = await GetRate(); |
| | | //CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "未配置折扣"); |
| | | var repeatOrder = await _lifePayOrderRepository.Where(x => x.LifePayOrderType == LifePayOrderTypeEnum.燃气订单 && x.PayStatus == LifePayStatusEnum.已支付 |
| | | && x.LifePayOrderStatus == LifePayOrderStatusEnum.充值中 && x.OrderParamDetailJsonStr.Contains(input.ProductData.GasOrgType) |
| | | && x.OrderParamDetailJsonStr.Contains(input.ProductData.GasAccount)).ToListAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder.Count() > 0, "您有同户号订单正在充值中,请勿重复充值"); |
| | | |
| | | |
| | | var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.默认燃气折扣); |
| | |
| | | |
| | | #if DEBUG |
| | | //var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, 0.01m, ip, input.H5Type); |
| | | var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, order.PayAmount, ip, input.H5Type); |
| | | var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, order.PayAmount ?? 0, ip, input.H5Type); |
| | | #else |
| | | //var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, 0.01m, ip, input.H5Type); |
| | | var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, order.PayAmount, ip, input.H5Type); |
| | | var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, order.PayAmount??0, ip, input.H5Type); |
| | | #endif |
| | | |
| | | return payUrl; |
| | |
| | | |
| | | // var result = await PayTransactionsJsAPI(input.OpenId, input.Attach, order.PayAmount, input.OrderNo, desc); |
| | | |
| | | var result = await PayTransactionsJsAPI(input.OpenId, input.PayAppId, input.Attach, order.PayAmount, input.OrderNo, desc); |
| | | var result = await PayTransactionsJsAPI(input.OpenId, input.PayAppId, input.Attach, order.PayAmount ?? 0, input.OrderNo, desc); |
| | | return result; |
| | | //var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, 0.01m, ip, input.H5Type); |
| | | //var payUrl = await GetPayQRCode(order.LifePayType.Value, order.OrderNo, desc, order.PayAmount, ip, input.H5Type); |
| | |
| | | |
| | | if (input.LifePayRefundType == LifePayRefundTypeEnum.全额退款) |
| | | { |
| | | input.RefundPrice = order.PayAmount; |
| | | input.RefundPrice = order.PayAmount ?? 0; |
| | | } |
| | | |
| | | if (order.LifePayOrderStatus != LifePayOrderStatusEnum.待退款 || order.PayStatus != LifePayStatusEnum.已支付 || order.LifePayRefundStatus != LifePayRefundStatusEnum.待退款) |
| | |
| | | from b in temp.DefaultIfEmpty() |
| | | select new LifePayOrderListOutput |
| | | { |
| | | DiscountAmount = a.DiscountAmount, |
| | | DiscountAmount = a.DiscountAmount ?? 0, |
| | | FinishTime = a.FinishTime, |
| | | Id = a.Id, |
| | | LifePayOrderStatus = a.LifePayOrderStatus, |
| | | LifePayOrderStatus = a.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = a.LifePayOrderType, |
| | | LifePayType = a.LifePayType, |
| | | OrderNo = a.OrderNo, |
| | | PayAmount = a.PayAmount, |
| | | PayAmount = a.PayAmount ?? 0, |
| | | PhoneNumber = a.PhoneNumber, |
| | | RechargeAmount = a.RechargeAmount, |
| | | RechargeAmount = a.RechargeAmount ?? 0, |
| | | UserId = a.UserId, |
| | | OutOrderNo = a.OutOrderNo, |
| | | PayStatus = a.PayStatus, |
| | | PayStatus = a.PayStatus ?? 0, |
| | | PayTime = a.PayTime, |
| | | ACOOLYOrderNo = a.ACOOLYOrderNo, |
| | | RefundCredentialsImgUrl = a.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | from b in temp.DefaultIfEmpty() |
| | | select new LifePayOrderListOutput |
| | | { |
| | | DiscountAmount = a.DiscountAmount, |
| | | DiscountAmount = a.DiscountAmount ?? 0, |
| | | FinishTime = a.FinishTime, |
| | | Id = a.Id, |
| | | LifePayOrderStatus = a.LifePayOrderStatus, |
| | | LifePayOrderStatus = a.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = a.LifePayOrderType, |
| | | LifePayType = a.LifePayType, |
| | | OrderNo = a.OrderNo, |
| | | PayAmount = a.PayAmount, |
| | | PayAmount = a.PayAmount ?? 0, |
| | | PhoneNumber = a.PhoneNumber, |
| | | RechargeAmount = a.RechargeAmount, |
| | | RechargeAmount = a.RechargeAmount ?? 0, |
| | | UserId = a.UserId, |
| | | OutOrderNo = a.OutOrderNo, |
| | | PayStatus = a.PayStatus, |
| | | PayStatus = a.PayStatus ?? 0, |
| | | PayTime = a.PayTime, |
| | | ACOOLYOrderNo = a.ACOOLYOrderNo, |
| | | RefundCredentialsImgUrl = a.RefundCredentialsImgUrl.GetOssPath(), |