This commit is contained in:
Hankin 2026-04-27 09:46:15 +08:00
parent e7fa513f18
commit eb5afec88a

View File

@ -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);