1.返冲异步

This commit is contained in:
xucong 2024-09-08 10:59:27 +08:00
parent 7b2bc56f5c
commit 46c36a26df
2 changed files with 13 additions and 1 deletions

@ -76,6 +76,11 @@ class Billions extends Api
{
$post = $this->request->post();
$result = BillionsLogic::applyBillionsBalance($this->user_id, $post);
return JsonServer::success("请求成功",$result);
}
public function postBillions(){
$post = $this->request->post();
$result = BillionsLogic::asynchronousBillions($this->user_id, $post);
if ($result['code'] == -1) {
return JsonServer::error($result['msg']);
@ -85,7 +90,6 @@ class Billions extends Api
return JsonServer::success($result['msg']);
}
}
public function billionWithdrawal(){
$user_id = $this->user_id;
$price = $this->request->post("money");

@ -306,6 +306,14 @@ class BillionsLogic extends Logic
'give_growth' => 0,
'create_time' => time()
]);
$d['id'] = $id;
$d['order_sn'] = $order_sn;
return $d;
}
public static function asynchronousBillions($user_id,$post){
$money = $post['money'];
$id = $post['id'];
$order_sn = $post['order_sn'];
$user_subsidy = 2; // 自我补贴
$all_user_subsidy = 20; //全用户获取的比例
$user_start_num = 1; // 补贴前几位数量