示例#1
0
        public void Execute(User currentUser)
        {
            var serialNo = SerialNoHelper.Create();

            using (var proxy = new ServiceProxy <IAccountDealService>())
            {
                var rollback = this.RollbackShopDealLogService.GetById(RollbackId);
                if (rollback == null || rollback.State != RollbackShopDealLogState.Processing)
                {
                    throw new Exception("³åÕýÇëÇóδÕÒµ½");
                }
                var shopDealLog = this.ShopDealLogService.GetById(rollback.ShopDealLogId);
                var dealLog     = this.DealLogService.GetById(shopDealLog.Addin);
                var account     = this.AccountService.GetById(dealLog.AccountId);
                var request     = new PayRequest_(dealLog.AccountName, "", dealLog.SourcePosName, Math.Abs(dealLog.Amount), serialNo, dealLog.SerialNo, account.AccountToken, dealLog.SourceShopName)
                {
                    IsForce = true
                };
                var rsp = proxy.Proxy.Roolback(request);
                if (rsp.Code != ResponseCode.Success)
                {
                    throw new Exception(ModelHelper.GetBoundText(rsp, x => x.Code));
                }
                rollback.State = RollbackShopDealLogState.Done;
                RollbackShopDealLogService.Update(rollback);
            }
        }
示例#2
0
 public AccountServiceResponse Roolback(PayRequest_ request, bool IsWeb = false)
 {
     return(InnerExecute((x) => x.Roolback(request)));
 }
示例#3
0
 public AccountServiceResponse Roolback(PayRequest_ request, bool IsWeb = false)
 {
     throw new System.NotImplementedException();
 }