diff --git a/app/Http/Controllers/Server/H5/EarningController.php b/app/Http/Controllers/Server/H5/EarningController.php index ef87037..c7c2894 100644 --- a/app/Http/Controllers/Server/H5/EarningController.php +++ b/app/Http/Controllers/Server/H5/EarningController.php @@ -721,6 +721,9 @@ class EarningController extends Controller DB::beginTransaction(); $withdraw = MEarningwithdraws::where("trade_no", $res["data"]["out_bill_no"])->first(); + if ($withdraw->status != "wait_user_confirm") { + throw new Exception("订单已回调"); + } $earning_account = MEarningAccount::where("m_id", $withdraw->m_id)->where("m_user_id", $withdraw->m_user_id)->first(); //修改账号状态 if ($res["data"]["state"] == "SUCCESS") { $earning_account->decrement('frozen_withdraw', $withdraw->value);