コード例 #1
0
ファイル: RefundmentService.cs プロジェクト: 842549829/Pool
        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;
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: PostponePayBill.cs プロジェクト: 842549829/Pool
 internal PostponePayBill(decimal orderId, decimal applyformId)
     : base(applyformId)
 {
     OrderId           = orderId;
     _refundBillLoader = new LazyLoader <PostponeRefundBill>(() => DistributionQueryService.QueryPostponeRefundBill(ApplyformId));
 }