新用户本地生活付款跳转错误

This commit is contained in:
xucong 2024-12-06 15:13:08 +08:00
parent 5546a463e3
commit 0fcd011664
2 changed files with 8 additions and 3 deletions

@ -122,11 +122,15 @@ class BillionsLogic extends Logic
->where("residue_price",">","0")
->where("user_start_price",">","0")
->select()->toArray();
if(count($result)<1){
return false;
}
foreach($result as $key=>$value){
$result = Db::name("user_billions_surplus_log")
->where("surplus_id",$value['surplus_id'])
->where("user_billion_id",$billion)
->find();
if($value['billions_id']>=$billion){
if($result == null){
$d['surplus_id'] = $value['surplus_id'];

@ -36,6 +36,7 @@ class Billions
$data['dtime'] = date("Y-m-d H:i:s");
$data['type'] = $order['type']; // 类型是充值
$data['subsidy_price'] = round($order['order_amount'] * $user_subsidy / 100,8);
$data['withdrawal_amount'] = $data['subsidy_price'];
$res = Db::name("user_billions")->insertGetId($data);
$subsidy = $order['order_amount'] * $all_user_subsidy / 100;
if($is_d != null){
@ -79,7 +80,7 @@ class Billions
}
}else{
$d['user_id'] = $v['user_id'];
$d['total_amount'] = $v['order_price'];
$d['total_amount'] = round($v['order_price']-$v['available_amount'],8);
$first_update_subsidy_withdrawal = Db::name("subsidy_withdrawal")->insertGetId($d);
if(!$first_update_subsidy_withdrawal){
return -4;
@ -88,14 +89,14 @@ class Billions
$dat['user_id'] = $v['user_id'];
$dat['billions_id'] = $v['billions_id'];
$dat['type'] = 1;
$dat['money'] = $v['order_price'];
$dat['money'] = $d['total_amount'] ;
$dat['create_time'] = date("Y-m-d H:i:s");
// 插入提现记录
$first_save_record = Db::name("subsidy_withdrawal_record")->save($dat);
if ($first_save_record) {
$send = array(
'user_id' => $v['user_id'],
'money' => $v['order_price']
'money' => $d['total_amount']
);
sendBillionsSubsidySMS($send);
}