From 86d1b9c94b0d060b278e6297733bbafe39b60881 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Sun, 6 Oct 2024 18:02:28 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=AF=94=E4=BE=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/BillionsLogic.php | 2 +- app/api/logic/OrderLogic.php | 2 +- app/api/logic/PayLogic.php | 27 +++++++++++++++++++++------ app/common/logic/PayNotifyLogic.php | 19 ++++++++++++++----- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/app/api/logic/BillionsLogic.php b/app/api/logic/BillionsLogic.php index bd996ec3..5aef54a5 100755 --- a/app/api/logic/BillionsLogic.php +++ b/app/api/logic/BillionsLogic.php @@ -451,7 +451,7 @@ class BillionsLogic extends Logic $id = $post['id']; $order_sn = $post['order_sn']; $user_subsidy = 2; // 自我补贴 - $all_user_subsidy = 18; //全用户获取的比例 + $all_user_subsidy = 20; //全用户获取的比例 $user_start_num = 1; // 补贴前几位数量 $user_start_subsidy = 30; //补贴前几位比例 全用户比例中扣除 $user_end_subsidy = 70; //补贴剩余部分比例 diff --git a/app/api/logic/OrderLogic.php b/app/api/logic/OrderLogic.php index c2b2b9b0..cf44041c 100755 --- a/app/api/logic/OrderLogic.php +++ b/app/api/logic/OrderLogic.php @@ -1835,7 +1835,7 @@ class OrderLogic extends Logic } } $user_subsidy = 2; // 自我补贴 - $all_user_subsidy = 18; //全用户获取的比例 + $all_user_subsidy = 20; //全用户获取的比例 $user_start_num = 1; // 补贴前几位数量 $user_start_subsidy = 30; //补贴前几位比例 全用户比例中扣除 $user_end_subsidy = 70; //补贴剩余部分比例 diff --git a/app/api/logic/PayLogic.php b/app/api/logic/PayLogic.php index da3c0cc9..5c467465 100755 --- a/app/api/logic/PayLogic.php +++ b/app/api/logic/PayLogic.php @@ -715,7 +715,14 @@ class PayLogic extends Logic $dt['bank_name'] = $company['bankName']; $dt['bank_card'] = $company['bankCard']; $dt['large_number'] = $company['largeNumber']; - $dt['separate_account'] = round($post['money']*0.7,2); + if($post['lid'] == 138){ + $dt['separate_account'] = round($post['money']*0.72,2); + $dt2['separate_account'] = round($post['money']*0.20,2); + }else{ + $dt['separate_account'] = round($post['money']*0.7,2); + $dt2['separate_account'] = round($post['money']*0.22,2); + } + $dt['create_time'] = date("Y-m-d H:i:s"); $dt['user_id'] = $user_id; $dt['order_no'] = $out_trade_no; @@ -744,7 +751,7 @@ class PayLogic extends Logic $dt2['bank_name'] = "中国工商银行"; $dt2['bank_card'] = "1204064019200152507"; $dt2['large_number'] = "102335006405"; - $dt2['separate_account'] = round($post['money']*0.22,2); + $dt2['create_time'] = date("Y-m-d H:i:s"); $dt2['user_id'] = $user_id; $dt2['local_our_company'] = 1; @@ -825,14 +832,22 @@ class PayLogic extends Logic $company = Db::name("local_store")->where("lstore_id",$post['lid'])->where("is_delete",0)->find(); $local_store_order_no = createSn('local_store_order', 'order_no', '', 4); - + if($post['lid'] == 138){ + $dt['separate_account'] = round($post['money']*0.72,2); + $dt2['separate_account'] = round($post['money']*0.20,2); + $price = round($post['money']*0.72,2); + }else{ + $dt['separate_account'] = round($post['money']*0.7,2); + $dt2['separate_account'] = round($post['money']*0.22,2); + $price = round($post['money']*0.7,2); + } if ($company['empowerPhone']) { event('Notice', [ 'scene' => NoticeEnum::LOCAL_SHOP_COLLECTION_NOTICE, 'mobile' => $company['empowerPhone'], 'params' => [ 'user_id' => $user_id, - 'money' => round($post['money']*0.7,2), + 'money' => $price, 'time' => date("Y-m-d H:i:s"), 'order' => $local_store_order_no, ] @@ -863,7 +878,7 @@ class PayLogic extends Logic $dt['bank_card'] = $company['bankCard']; $dt['total_amount'] = $post['money']; $dt['large_number'] = $company['largeNumber']; - $dt['separate_account'] = round($post['money']*0.7,2); +// $dt['separate_account'] = round($post['money']*0.7,2); $dt['create_time'] = date("Y-m-d H:i:s"); $dt['user_id'] = $user_id; $dt['pay_shop_type'] = 1; @@ -902,7 +917,7 @@ class PayLogic extends Logic $dt2['bank_name'] = "中国工商银行"; $dt2['bank_card'] = "1204064019200152507"; $dt2['large_number'] = "102335006405"; - $dt2['separate_account'] = round($post['money']*0.22,2); +// $dt2['separate_account'] = round($post['money']*0.22,2); $dt2['create_time'] = date("Y-m-d H:i:s"); $dt2['user_id'] = $user_id; $dt2['state'] = 1; diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index a5f6936f..0c4d54ae 100755 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -233,13 +233,18 @@ class PayNotifyLogic $result = Db::name("local_pay")->where("order_sn",$order_sn)->find(); if($result['pay_status'] == 0){ $local_store = Db::name('local_store')->where(['lstore_id' => $result['local_id']])->find(); + if($result['local_id'] == 138){ + $price = round($result['order_amount']*0.72,2); + }else{ + $price = round($result['order_amount']*0.7,2); + } if ($local_store['empowerPhone']) { event('Notice', [ 'scene' => NoticeEnum::LOCAL_SHOP_COLLECTION_NOTICE, 'mobile' => $local_store['empowerPhone'], 'params' => [ 'user_id' => $local_store['user_id'], - 'money' => round($result['order_amount']*0.6,2), + 'money' => $price, 'time' => date("Y-m-d H:i:s"), 'order' => $order_sn, ] @@ -272,7 +277,7 @@ class PayNotifyLogic $account_log->change_type = 0; $account_log->create_time = time(); $account_log->save(); - return self::recharge_billions($order, $result['user_id'],$type); + return self::recharge_billions($order, $result['user_id'],$type,$result['local_id']); } } /** @@ -421,7 +426,7 @@ class PayNotifyLogic $type = "balance_rechange"; $order['type'] = 2; // 余额充值参与百亿补贴 - self::recharge_billions($order, $order['user_id'],$type); + self::recharge_billions($order, $order['user_id'],$type,""); } } } @@ -804,7 +809,7 @@ class PayNotifyLogic } - private static function recharge_billions($order, $user_id,$type="") + private static function recharge_billions($order, $user_id,$type="",$lstore_id="") { if(isset($order['id'])){ $check_order = Db::name("user_billions") @@ -817,7 +822,11 @@ class PayNotifyLogic } $user_subsidy = 2; // 自我补贴 - $all_user_subsidy = 18; //全用户获取的比例 + if($lstore_id == 138){ + $all_user_subsidy = 18; //全用户获取的比例 + }else{ + $all_user_subsidy = 20; + } $user_start_num = 1; // 补贴前几位数量 $user_start_subsidy = 30; //补贴前几位比例 全用户比例中扣除 $user_end_subsidy = 70; //补贴剩余部分比例