Ejemplo n.º 1
0
 def generateWithDrawChargeFeeFlow(self,w,account):
     account_flow = AccountFlow.objects.create(accountId=account)
     account_flow.amount = w.moneyAmount
     account_flow.tradeTime = timezone.now()
     account_flow.accountType = BidConst.GET_ACCOUNT_ACTIONTYPE_WITHDRAW_MANAGE_CHARGE()
     account_flow.usableAmount = account.usableAmount
     account_flow.freezedAmount = account.freezedAmount
     account_flow.note = '支付提现手续费成功,扣除金额:' + str(w.charge)  # '借款成功,收到借款金额:' + str(all_amount)
     account_flow.save()
Ejemplo n.º 2
0
 def generateWithDrawSuccessFlow(self,realWithdrawFee,account):
     account_flow = AccountFlow.objects.create(accountId=account)
     account_flow.amount = realWithdrawFee
     account_flow.tradeTime = timezone.now()
     account_flow.accountType = BidConst.GET_ACCOUNT_ACTIONTYPE_WITHDRAW_MANAGE_CHARGE()
     account_flow.usableAmount = account.usableAmount
     account_flow.freezedAmount = account.freezedAmount
     account_flow.note = '提现成功,提现金额:' + str(realWithdrawFee)  # '借款成功,收到借款金额:' + str(all_amount)
     account_flow.save()
Ejemplo n.º 3
0
 def generateChargeWithdrawFeeFlow(self,w):
     # // 1, 得到当前系统账户;
     system_account = SystemAccount.objects.first()
     system_account.usableAmount = system_account.usableAmount + CalculatetUtil.calAccountManagementCharge(w.charge)
     system_account.save()
     # //生成系统流水
     account_flow = SystemAccountFlow.objects.create(systemAccountId=system_account)
     account_flow.amount = w.moneyAmount
     account_flow.tradeTime = timezone.now()
     account_flow.accountType = BidConst.GET_ACCOUNT_ACTIONTYPE_WITHDRAW_MANAGE_CHARGE()
     account_flow.usableAmount = system_account.usableAmount
     account_flow.freezedAmount = system_account.freezedAmount
     account_flow.note = '提现手续费充值成功,增加金额:' + str(w.charge)  # '借款成功,收到借款金额:' + str(all_amount)
     account_flow.save()