提现修改-调试

This commit is contained in:
2025-09-30 16:28:10 +08:00
parent cf2a49d020
commit 404f195d57
3 changed files with 14 additions and 8 deletions

View File

@@ -259,10 +259,11 @@ class Withdrawal extends adminApi
return ['code' => 0, 'msg' => '单人单月云账户提现金额最大为98000元!', 'data' => null]; return ['code' => 0, 'msg' => '单人单月云账户提现金额最大为98000元!', 'data' => null];
} }
//查询该用户信息 //查询该用户信息
$user_info = model('api/user')->get_user_info($withdraw_info['user_id'], ['user']); $user_info = model('api/user')->get_user_info($withdraw_info['user_id'], ['user','user_auth']);
if(empty($user_info)){ if(empty($user_info)){
return ['code' => 0, 'msg' => '用户信息错误!', 'data' => null]; return ['code' => 0, 'msg' => '用户信息错误!', 'data' => null];
} }
$real_name = $user_info['real_name']; $real_name = $user_info['real_name'];
$id_card = $user_info['card_id']; $id_card = $user_info['card_id'];
$order_id = $withdraw_info['order_sn']; $order_id = $withdraw_info['order_sn'];

View File

@@ -232,7 +232,7 @@ class UserWithdrawal extends Model
}else{ }else{
$surplus_money = $value['money']; $surplus_money = $value['money'];
} }
$return_data[$key]['surplus_money'] = $surplus_money; $return_data[$key]['surplus_money'] = round($surplus_money,2);
$return_data[$key]['createtime'] = date('Y-m-d H:i:s',$value['createtime']); $return_data[$key]['createtime'] = date('Y-m-d H:i:s',$value['createtime']);
} }

View File

@@ -33,9 +33,9 @@ class PerformPerSecond
// echo "房间火热值更新:\n"; // echo "房间火热值更新:\n";
// $this->room_hot_update(); // $this->room_hot_update();
// echo "\n"; // echo "\n";
echo "提现云账号订单状态查询:\n"; // echo "提现云账号订单状态查询:\n";
$this->withdraw_order_status(); // $this->withdraw_order_status();
echo "\n"; // echo "\n";
} }
@@ -131,7 +131,7 @@ class PerformPerSecond
public function withdraw_order_status(){ public function withdraw_order_status(){
//一个月内的数据 //一个月内的数据
$time = time() - 7 * 86400; $time = time() - 7 * 86400;
$withdrawal = db::name('vs_user_withdrawal')->where(['deal_type'=>2,'status'=>['in',[4,5]],'yun_order_status'=>["<>",5077]])->where(['submit_yun_time'=>['>=',$time]])->select(); $withdrawal = db::name('vs_user_withdrawal')->where(['deal_type'=>2,'status'=>['in',[4,5]]])->where(['submit_yun_time'=>['>=',$time]])->select();
echo "提现云账号订单状态查询条数(".count($withdrawal)."\n"; echo "提现云账号订单状态查询条数(".count($withdrawal)."\n";
foreach ($withdrawal as $key => $value) { foreach ($withdrawal as $key => $value) {
if($value['status'] == 5){ if($value['status'] == 5){
@@ -143,13 +143,16 @@ class PerformPerSecond
$yun_pay = new YunPay($value['order_sn'], "", "", "", "",""); $yun_pay = new YunPay($value['order_sn'], "", "", "", "","");
$result = $yun_pay->queryOrder($value['type']); $result = $yun_pay->queryOrder($value['type']);
if($result['code'] == 1){ if($result['code'] == 1){
$result_data = $result['data']['data'];
if($result['data']['code']==0){ if($result['data']['code']==0){
db::name('vs_user_withdrawal')->where('order_sn',$value['order_sn'])->update([ db::name('vs_user_withdrawal')->where('order_sn',$value['order_sn'])->update([
'status' => 6, 'status' => 6,
'pay_time' => time(), 'pay_time' => time(),
'pay_message' => $result['data']['msg'], 'pay_message' => $result['data']['msg'],
'updatetime' => time(), 'updatetime' => time(),
'yun_order_status' => $result['data']['code'] 'yun_order_status' => $result['data']['code'],
'personal_tax_rate' => $result_data->tax_detail->personal_tax_rate ?? 0,
'received_tax_amount' => $result_data->received_tax_amount ?? 0,
]); ]);
}else{ }else{
db::name('vs_user_withdrawal')->where('order_sn',$value['order_sn'])->update([ db::name('vs_user_withdrawal')->where('order_sn',$value['order_sn'])->update([
@@ -157,7 +160,9 @@ class PerformPerSecond
'pay_time' => time(), 'pay_time' => time(),
'pay_message' => $result['data']['msg'], 'pay_message' => $result['data']['msg'],
'updatetime' => time(), 'updatetime' => time(),
'yun_order_status' => $result['data']['code'] 'yun_order_status' => $result['data']['code'],
'personal_tax_rate' => $result_data->tax_detail->personal_tax_rate ?? 0,
'received_tax_amount' => $result_data->received_tax_amount ?? 0,
]); ]);
if($result['data']['code']==5077 && $value['yun_order_status'] == null){ if($result['data']['code']==5077 && $value['yun_order_status'] == null){
//该支付宝账户不存在或未开通手机号转账功能。如有疑问,请收款用户联系支付宝客服咨询。 //该支付宝账户不存在或未开通手机号转账功能。如有疑问,请收款用户联系支付宝客服咨询。