feat: 新增

This commit is contained in:
陈狼 2025-02-22 23:32:37 +08:00
parent cf00d1d6d9
commit d88062b4f6
2 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,7 @@ class WithdrawController
$Withdraw = Withdraw::where('id', $id)->first();
$Withdraw->status = 5;
$Withdraw->status_text = '支付失败:用户银行信息存在问题';
$Withdraw->order_number = $res->TrackingNumber ?? null;
$Withdraw->save();
UserRewardDao::base($user_id, 1, $money, '提现失败返还');
return ApiResponse::error(null, '用户银行信息存在问题');
@ -109,12 +110,14 @@ class WithdrawController
$Withdraw = Withdraw::where('id', $id)->first();
$Withdraw->status = 2;
$Withdraw->status_text = '已到账';
$Withdraw->order_number = $res->TrackingNumber ?? null;
$Withdraw->save();
return ApiResponse::success(200, null, '操作成功');
} else {
$Withdraw = Withdraw::where('id', $id)->first();
$Withdraw->status = 5;
$Withdraw->status_text = '支付失败:用户银行信息存在问题';
$Withdraw->order_number = $res->TrackingNumber ?? null;
$Withdraw->save();
UserRewardDao::base($user_id, 1, $money, '提现失败返还');
return ApiResponse::error(200, null, '用户银行信息存在问题');

View File

@ -110,6 +110,7 @@ class WithdrawController
return ApiResponseApp::error(null, '每天只能提现三次');
}
$user = User::find($user_id);
//提现金额
$rate = ExchangeRate::where('type', 'BDT')->get();
$money = $money_no / 100 * $rate[0]['points'];