internal static void ProcessPostponeRefundment(RefundFailedRecord refundInfo) { var refundBill = DistributionQueryService.QueryPostponeRefundBill(refundInfo.ApplyformId); if (refundBill != null) { var refundResult = Refund(refundInfo.OrderId, refundBill); if (refundResult.Success) { DistributionProcessService.PostponeRefundSuccess(refundBill, refundResult.RefundTime.Value); using (var command = Order.Repository.Factory.CreateCommand()) { command.BeginTransaction(); try { var distributionRepository = Order.Repository.Factory.CreateDistributionRepository(command); distributionRepository.UpdateRefundBillForRefundSuccess(refundBill); command.CommitTransaction(); } catch (Exception ex) { command.RollbackTransaction(); LogService.SaveExceptionLog(ex, "申请单退款"); throw; } } } } }
internal PostponePayBill(decimal orderId, decimal applyformId) : base(applyformId) { OrderId = orderId; _refundBillLoader = new LazyLoader <PostponeRefundBill>(() => DistributionQueryService.QueryPostponeRefundBill(ApplyformId)); }