1.比例修改

This commit is contained in:
xucong 2024-10-06 18:02:28 +08:00
parent cd87559576
commit 86d1b9c94b
4 changed files with 37 additions and 13 deletions

@ -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; //补贴剩余部分比例

@ -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; //补贴剩余部分比例

@ -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;

@ -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; //补贴剩余部分比例