diff --git a/app/Http/Controllers/Server/H5/EarningController.php b/app/Http/Controllers/Server/H5/EarningController.php index b65a372..84fb0d6 100644 --- a/app/Http/Controllers/Server/H5/EarningController.php +++ b/app/Http/Controllers/Server/H5/EarningController.php @@ -563,7 +563,7 @@ class EarningController extends Controller $amount = $request->amount; if (!is_numeric($amount) || $amount <= 0) return $this->failure('请输入正确的提现金额'); - if ($amount < 1) + if ($amount < 1 && $merchant_user_id != 221) return $this->failure('单笔提现最低金额为1元'); $earning_account = MEarningAccount::where('m_id', $merchant_id)->where('m_user_id', $merchant_user_id)->first(); if (empty($earning_account)) { @@ -576,11 +576,15 @@ class EarningController extends Controller if ($earning_account->balance < $amount) return $this->failure('提现金额不能大于可以提现的总金额!'); $trade_no = \CommonUtilsService::getTradeNO(); - $poundage = Redis::get('withdrawal_poundage') ?? 2; //提现手续费百分比 - $poundage = $amount * ($poundage / 100) >= 0.01 ? $amount * ($poundage / 100) : 0.01;//收取手续费费用 不足1分 按一分处理 - $poundage = floor($poundage * 100) / 100; - Log::info("amount:" . $amount . " & poundage:" . $poundage); - $actual_received = $amount - $poundage;//实际到账金额 + $actual_received = $amount; + if ($merchant_user_id != 221) { + $poundage = Redis::get('withdrawal_poundage') ?? 2; //提现手续费百分比 + $poundage = $amount * ($poundage / 100) >= 0.01 ? $amount * ($poundage / 100) : 0.01;//收取手续费费用 不足1分 按一分处理 + $poundage = floor($poundage * 100) / 100; + Log::info("amount:" . $amount . " & poundage:" . $poundage); + $actual_received = $amount - $poundage;//实际到账金额 + } + //处理冻结金额 DB::beginTransaction(); $earning_account->balance = $earning_account->balance - $amount;