1.提现优化
This commit is contained in:
parent
71771c609b
commit
120e08865d
@ -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
|
||||
]);
|
||||
|
||||
@ -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
|
||||
]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user