wallet_fix
This commit is contained in:
@ -27,6 +27,7 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
'from_user_transaction_id',
|
||||
'from_uid',
|
||||
'wallet_addr',
|
||||
'from_wallet_transaction_id',
|
||||
'received_amount',
|
||||
'entered_amount',
|
||||
'fee_amount',
|
||||
@ -69,6 +70,7 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
$entered_amount,
|
||||
$platform_id,
|
||||
$currency_code,
|
||||
$from_uid = '',
|
||||
$from_user_transaction_id = '',
|
||||
$from_wallet_addr_id = '',
|
||||
$wallet_addr = '',
|
||||
@ -109,6 +111,7 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
'currency_type' => $resWalletPlatformBalanceModel->currency_type,
|
||||
'from_wallet_addr_id' => $from_wallet_addr_id,
|
||||
'from_user_transaction_id' => $from_user_transaction_id,
|
||||
'from_uid' => $from_uid,
|
||||
'wallet_addr' => $wallet_addr,
|
||||
'received_amount' => $received_amount,
|
||||
'entered_amount' => $entered_amount,
|
||||
@ -130,11 +133,12 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
$amount,
|
||||
$platform_id,
|
||||
$currency_code,
|
||||
$uid,
|
||||
): \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Builder|bool
|
||||
{
|
||||
try {
|
||||
Db::beginTransaction();
|
||||
$resModel = $this->addPlatformTransaction(self::TYPE_USER_WITHDRAW, self::STATUS_WAITING_QUEUE, $amount,$amount, $platform_id, $currency_code);
|
||||
$resModel = $this->addPlatformTransaction(self::TYPE_USER_WITHDRAW, self::STATUS_WAITING_QUEUE, $amount,$amount, $platform_id, $currency_code,$uid);
|
||||
if(!$resModel) throw new ModelException('addPlatformTransaction error');
|
||||
$oWalletPlatformBalanceModel = new WalletPlatformBalanceModel();
|
||||
$res = $oWalletPlatformBalanceModel->findPlatformBalance($platform_id,$currency_code);
|
||||
@ -213,6 +217,8 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
}
|
||||
|
||||
function newRechargePlatformTransaction(
|
||||
$resWalletAddrTransactionModel,
|
||||
$resWalletPlatformUserTransactionModel,
|
||||
$amount,
|
||||
$platform_id,
|
||||
$currency_code,
|
||||
@ -220,7 +226,7 @@ class WalletPlatformBalanceTransactionModel extends WalletBaseModel
|
||||
{
|
||||
try {
|
||||
Db::beginTransaction();
|
||||
$resModel = $this->addPlatformTransaction(self::TYPE_USER_RECHARGE, self::STATUS_SUCCESS, $amount,$amount, $platform_id, $currency_code);
|
||||
$resModel = $this->addPlatformTransaction(self::TYPE_USER_RECHARGE, self::STATUS_SUCCESS, $amount,$amount, $platform_id, $currency_code,$resWalletPlatformUserTransactionModel->uid,$resWalletPlatformUserTransactionModel->id,$resWalletAddrTransactionModel->wallet_addr_id,$resWalletAddrTransactionModel->wallet_addr);
|
||||
if(!$resModel) throw new ModelException('addPlatformTransaction error');
|
||||
$oWalletPlatformBalanceModel = new WalletPlatformBalanceModel();
|
||||
$resWalletPlatformBalanceModel = $oWalletPlatformBalanceModel->findPlatformBalance($platform_id,$currency_code);
|
||||
|
||||
Reference in New Issue
Block a user