feat: 提现

This commit is contained in:
陈狼 2025-02-16 22:54:13 +08:00
parent d36fddb161
commit 9aea9eb294
1 changed files with 3 additions and 2 deletions

View File

@ -85,9 +85,10 @@ class WithdrawController
$user=User::find($user_id);
//提现金额
$rate = ExchangeRate::where('type','BDT')->get();
$money = $money_no/100*$rate[0]['points']+500;
$money = $money_no/100*$rate[0]['points'];
var_dump($money);
//用户积分减少$money
UserRewardDao::base($user_id, 1, -$money_no, '提现');
UserRewardDao::base($user_id, 1, -($money_no+500), '提现');
//大于1000等待管理员审核
if($money>=1000){
Withdraw::create([