调整转入转出用户日志
parent
cd967de6fe
commit
98d49bfc2b
|
|
@ -225,7 +225,7 @@ class WalletController extends Controller
|
||||||
$rate = app_settings('withdraw.rate', '0.00');//手续费率
|
$rate = app_settings('withdraw.rate', '0.00');//手续费率
|
||||||
|
|
||||||
//计算手续费(四舍五入)
|
//计算手续费(四舍五入)
|
||||||
$serviceAmount = round(bcdiv($rate, 100, 4)*$amount);
|
$serviceAmount = round(bcdiv($rate, 100, 4) * $amount);
|
||||||
// //最少1分手续费
|
// //最少1分手续费
|
||||||
// if ($serviceAmount == 0) {
|
// if ($serviceAmount == 0) {
|
||||||
// $serviceAmount = 1;
|
// $serviceAmount = 1;
|
||||||
|
|
@ -240,7 +240,7 @@ class WalletController extends Controller
|
||||||
'amount'=> $amount,
|
'amount'=> $amount,
|
||||||
'rate' => $rate,
|
'rate' => $rate,
|
||||||
'service_amount' => $serviceAmount,
|
'service_amount' => $serviceAmount,
|
||||||
'account_amount' => $amount-$serviceAmount,
|
'account_amount' => $amount - $serviceAmount,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//减去用户可提金额
|
//减去用户可提金额
|
||||||
|
|
@ -359,7 +359,7 @@ class WalletController extends Controller
|
||||||
$log = $balanceService->changeBalance($user, -Arr::get($input, 'amount', 0), BalanceLog::ACTION_TRANSFER_OUT, '转出-'.$toUser->phone);
|
$log = $balanceService->changeBalance($user, -Arr::get($input, 'amount', 0), BalanceLog::ACTION_TRANSFER_OUT, '转出-'.$toUser->phone);
|
||||||
|
|
||||||
//转入对象
|
//转入对象
|
||||||
$balanceService->changeBalance($toUser, Arr::get($input, 'amount', 0), BalanceLog::ACTION_TRANSFER_IN, $toUser->phone.'-转入', $log);
|
$balanceService->changeBalance($toUser, Arr::get($input, 'amount', 0), BalanceLog::ACTION_TRANSFER_IN, $user->phone.'-转入', $log);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
} catch (Throwable $th) {
|
} catch (Throwable $th) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue