| | |
| | | using LifePayment.Application.Contracts; |
| | | using Alipay.EasySDK.Payment.Common.Models; |
| | | using LifePayment.Application.Contracts; |
| | | using LifePayment.Domain; |
| | | using LifePayment.Domain.LifePay; |
| | | using LifePayment.Domain.Models; |
| | |
| | | using Volo.Abp.EventBus.Distributed; |
| | | using Z.EntityFramework.Plus; |
| | | using ZeroD.Util; |
| | | using Alipay.EasySDK.Payment.Common.Models; |
| | | using static LifePayment.Domain.Shared.LifePaymentConstant; |
| | | using ZeroD.Util.Fadd; |
| | | using Nest; |
| | | using Volo.Abp.Domain.Entities; |
| | | using Volo.Abp.ObjectMapping; |
| | | using NPOI.SS.Formula.Functions; |
| | | using StackExchange.Redis; |
| | | using static Volo.Abp.Identity.Settings.IdentitySettingNames; |
| | | using static Microsoft.EntityFrameworkCore.DbLoggerCategory; |
| | | using LifePayment.Application.LifePay; |
| | | using Alipay.AopSdk.Core.Domain; |
| | | |
| | | namespace LifePayment.Application; |
| | | |
| | |
| | | DiscountAmount = a.DiscountAmount ?? 0, |
| | | FinishTime = a.FinishTime, |
| | | Id = a.Id, |
| | | LifePayOrderStatus = a.LifePayOrderStatus?? 0, |
| | | LifePayOrderStatus = a.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = a.LifePayOrderType, |
| | | LifePayType = a.LifePayType, |
| | | OrderNo = a.OrderNo, |
| | | PayAmount = a.PayAmount ?? 0, |
| | | PhoneNumber = a.PhoneNumber, |
| | | RechargeAmount = a.RechargeAmount??0, |
| | | RechargeAmount = a.RechargeAmount ?? 0, |
| | | UserId = a.UserId, |
| | | OutOrderNo = a.OutOrderNo, |
| | | PayStatus = a.PayStatus?? 0, |
| | | PayStatus = a.PayStatus ?? 0, |
| | | PayTime = a.PayTime, |
| | | ACOOLYOrderNo = a.ACOOLYOrderNo, |
| | | RefundCredentialsImgUrl = a.RefundCredentialsImgUrl.GetOssPath(), |
| | |
| | | RefundTime = a.RefundTime, |
| | | ChannelName = b.ChannlesName, |
| | | ActualRechargeAmount = a.RechargeAmount, |
| | | ActualReceivedAmount = a.ActualReceivedAmount, |
| | | PlatformDeductionAmount = a.PlatformDeductionAmount, |
| | | ACOOLYStatus = a.ACOOLYStatus, |
| | | LifePayRefundStatus = a.LifePayRefundStatus, |
| | |
| | | ACOOLYStatus = x.ACOOLYStatus, |
| | | RefundApplyRemark = x.RefundApplyRemark, |
| | | RechargeAmount = x.RechargeAmount, |
| | | ActualReceivedAmount = x.ActualReceivedAmount.ToString("F2"), |
| | | ActualReceivedAmount = (x.ActualReceivedAmount ?? 0).ToString("F2"), |
| | | LifePayRefundStatus = x.LifePayRefundStatus, |
| | | OrderNo = x.OrderNo, |
| | | |
| | |
| | | DiscountAmount = x.DiscountAmount ?? 0, |
| | | FinishTime = x.FinishTime, |
| | | Id = x.Id, |
| | | LifePayOrderStatus = x.LifePayOrderStatus?? 0 , |
| | | LifePayOrderStatus = x.LifePayOrderStatus ?? 0, |
| | | LifePayOrderType = x.LifePayOrderType, |
| | | LifePayType = x.LifePayType, |
| | | OrderNo = x.OrderNo, |
| | |
| | | |
| | | public async Task<List<CreateEditPayChannelsInput>> GetLifePayChannlesAllList(QueryLifePayChannlesInput input) |
| | | { |
| | | return await GetLifePayChannlesListFilter().WhereIf(input.Status.HasValue,x => x.Status == input.Status).ToListAsync(); |
| | | return await GetLifePayChannlesListFilter().WhereIf(input.Status.HasValue, x => x.Status == input.Status).ToListAsync(); |
| | | } |
| | | |
| | | public async Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id) |
| | |
| | | return await _wxPayApi.WxPayTradeQuery(outTradeNo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | var channle = await GetLifePayChannlesDtoByNum(input.ChannelId); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(channle == null, "渠道不存在"); |
| | | |
| | | var repeatOrder = await _lifePayOrderRepository.Where(x => x.LifePayOrderType == LifePayOrderTypeEnum.PhoneOrder |
| | | var repeatOrder = await _lifePayOrderRepository.Where(x => x.LifePayOrderType == LifePayOrderTypeEnum.PhoneOrder |
| | | && x.PayStatus == LifePayStatusEnum.已支付 |
| | | && x.LifePayOrderStatus == LifePayOrderStatusEnum.充值中 |
| | | && x.OrderParamDetailJsonStr.Contains(input.ProductData.Phone)).AnyAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder, "您有同户号订单正在充值中,请勿重复充值"); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder, "您有同户号订单正在充值中,请勿重复充值"); |
| | | |
| | | var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.默认话费折扣); |
| | | |
| | |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="outOrderNo"></param> |
| | | /// <returns></returns> |
| | | public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount, string refundApplyRemark) |
| | | public async Task ACOOLYOrderNotifyHandler(string orderNo, string acoolyOrderNo, LifePayOrderStatusEnum status, ACOOLYStatusEnum acoolyStatus, decimal payAmount, string refundApplyRemark, decimal? parValue = 0, decimal? actualParValue = 0) |
| | | { |
| | | var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "订单不存在"); |
| | |
| | | |
| | | /// 创建生活缴费消费记录 |
| | | await _lifePayOrderService.CreatLifePayConsumption(acoolyStatus, order.OrderNo, order.ACOOLYOrderNo, |
| | | order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime); |
| | | order.PlatformDeductionAmount ?? 0, order.ChannelId, order.CreationTime, order.FinishTime, order.ChannleRate, parValue, actualParValue); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | |
| | | return new SetPayTypeReturn() |
| | | { |
| | | Desc = desc, |
| | | OrderNo = order.OrderNo, |
| | | PayAmount = order.PayAmount.HasValue? order.PayAmount.Value : 0, |
| | | PayAmount = order.PayAmount.HasValue ? order.PayAmount.Value : 0, |
| | | LifePayType = lifePayType, |
| | | }; |
| | | } |