diff --git a/app/api/controller/Billions.php b/app/api/controller/Billions.php index 036ed997..0559acbf 100755 --- a/app/api/controller/Billions.php +++ b/app/api/controller/Billions.php @@ -209,17 +209,24 @@ class Billions extends Api $result_arr = json_decode($result,true); // var_dump($result_arr); // $result_arr['d'] = 1; - // if(!isset($result_arr['create_time'])) {//批次受理失败 - // $result_arr['d'] = 0; - // return $result_arr; - // // throw new \Exception($result_arr['message']); - // } + if(!isset($result_arr['create_time'])) {//批次受理失败 +// $result_arr['d'] = 0; + Db::name('withdraw_apply') + ->where('id', $withdraw_msg['id']) + ->update([ + 'status' => 4, // 提现中 + 'update_time' => time(), + 'pay_desc' => $result + ]); + return JsonServer::error('提现失败,请稍后再试'); + // throw new \Exception($result_arr['message']); + } //批次受理成功,更新提现申请单为提现中状态 Db::name('withdraw_apply') ->where('id', $withdraw_msg['id']) ->update([ - 'status' => 2, // 提现中 + 'status' => 3, // 提现中 'update_time' => time(), 'pay_desc' => $result ]); diff --git a/app/api/logic/WithdrawLogic.php b/app/api/logic/WithdrawLogic.php index ea2b1a25..7bce1caa 100755 --- a/app/api/logic/WithdrawLogic.php +++ b/app/api/logic/WithdrawLogic.php @@ -319,7 +319,7 @@ class WithdrawLogic extends Logic 'bank' => $post['bank'] ?? '', 'subbank' => $post['subbank'] ?? '', 'poundage' => $poundage, - 'status' => 3, // 待提现 + 'status' => 1, // 待提现 'create_time' => time(), ]; $withdraw_id = WithdrawApply::insertGetId($das); @@ -367,6 +367,14 @@ class WithdrawLogic extends Logic if(!isset($result_arr['create_time'])) {//批次受理失败 // $result_arr['d'] = 0; // return $result_arr; + Db::name('withdraw_apply') + ->where('id', $withdraw_msg['id']) + ->update([ + 'status' => 4, // 提现中 + 'update_time' => time(), + 'pay_desc' => $result + ]); + return "提现失败,请稍后再试"; throw new \Exception($result_arr['message']); } // var_dump($result_arr); @@ -381,7 +389,7 @@ class WithdrawLogic extends Logic Db::name('withdraw_apply') ->where('id', $withdraw_msg['id']) ->update([ - 'status' => 2, // 提现中 + 'status' => 3, // 提现中 'update_time' => time(), 'pay_desc' => $result ]);