feat: 新增
This commit is contained in:
parent
ee9b47ce40
commit
4a2a4e1dd6
|
@ -60,8 +60,6 @@ class UserbankController
|
|||
'remark' => $remark,
|
||||
]);
|
||||
}else{
|
||||
var_dump(22);
|
||||
|
||||
Userbank::create([
|
||||
'user_id' => $user_id,
|
||||
'account' => $account,
|
||||
|
|
|
@ -144,19 +144,19 @@ class WithdrawController
|
|||
$res = Payment::pushMoney($amount,$bank_username,$account,$bank_name);
|
||||
var_dump($res);
|
||||
if ($res['Success'] == 200) {
|
||||
$userbank = Userbank::where('id',$id)->first();
|
||||
$userbank->status = 2;
|
||||
$userbank->status_text = '已到账';
|
||||
$userbank->save();
|
||||
$Withdraw = Withdraw::where('id',$id)->first();
|
||||
$Withdraw->status = 2;
|
||||
$Withdraw->status_text = '已到账';
|
||||
$Withdraw->save();
|
||||
return ApiResponseApp::success(null,'转账成功');
|
||||
}else{
|
||||
return ApiResponseApp::error(null,'转账失败');
|
||||
}
|
||||
}else{
|
||||
$userbank = Userbank::where('id',$id)->first();
|
||||
$userbank->status = 3;
|
||||
$userbank->status_text = '已驳回';
|
||||
$userbank->save();
|
||||
$Withdraw = Withdraw::where('id',$id)->first();
|
||||
$Withdraw->status = 3;
|
||||
$Withdraw->status_text = '已驳回';
|
||||
$Withdraw->save();
|
||||
$rate = ExchangeRate::where('type','BDT')->get();
|
||||
//计算积分
|
||||
$money = $amount*100/$rate[0]['points']+300;
|
||||
|
|
Loading…
Reference in New Issue