|
|
@@ -520,31 +520,31 @@ class Notify
|
|
520
|
520
|
|
|
521
|
521
|
}
|
|
522
|
522
|
|
|
523
|
|
- //锁客收益
|
|
524
|
|
- if($user_data['mer_id'] != 0){
|
|
525
|
|
-
|
|
526
|
|
- $merchant_data = Db::name('merchant')->where('mer_id',$user_data['mer_id'])->find();
|
|
527
|
|
-
|
|
528
|
|
- $merchant_user_data = Db::name('user')->where('uid',$merchant_data['uid'])->find();
|
|
529
|
|
-
|
|
530
|
|
- if(!empty($merchant_user_data)){
|
|
531
|
|
-
|
|
532
|
|
-
|
|
533
|
|
- $yj_amount_90 = bcmul($pv * 0.9, 0.035,2);
|
|
534
|
|
- $fgj_amount_10 = bcmul($pv * 0.1, 0.035,2);//推广者的佣金抽10%到个人复购金
|
|
535
|
|
-
|
|
536
|
|
- $yj_amount = $merchant_data['brokerage_price'] + $yj_amount_90;
|
|
537
|
|
- $fgj_amount = $merchant_data['fugou'] + $fgj_amount_10;
|
|
538
|
|
- $this->fugou_user_log($merchant_data['uid'],$fgj_amount_10,$store_order_data['order_id'],1,1);
|
|
539
|
|
-
|
|
540
|
|
-
|
|
541
|
|
-
|
|
542
|
|
- //Db::name('user')->where('uid',$merchant_data['uid'])->update(['brokerage_price'=>$yj_amount,'fugou'=>$fgj_amount]);
|
|
543
|
|
- //推广佣金
|
|
544
|
|
- $this->bill_user_log($merchant_data['uid'],round($pv * 0.35,2),$store_order_data['order_id'],3,$store_order_data['order_sn'],'推广获得佣金',$store_order_data['mer_id']);
|
|
545
|
|
- }
|
|
546
|
|
-
|
|
547
|
|
- }
|
|
|
523
|
+ //锁客收益 todo 会员专区不做锁客 20250415
|
|
|
524
|
+// if($user_data['mer_id'] != 0){
|
|
|
525
|
+//
|
|
|
526
|
+// $merchant_data = Db::name('merchant')->where('mer_id',$user_data['mer_id'])->find();
|
|
|
527
|
+//
|
|
|
528
|
+// $merchant_user_data = Db::name('user')->where('uid',$merchant_data['uid'])->find();
|
|
|
529
|
+//
|
|
|
530
|
+// if(!empty($merchant_user_data)){
|
|
|
531
|
+//
|
|
|
532
|
+//
|
|
|
533
|
+// $yj_amount_90 = bcmul($pv * 0.9, 0.035,2);
|
|
|
534
|
+// $fgj_amount_10 = bcmul($pv * 0.1, 0.035,2);//推广者的佣金抽10%到个人复购金
|
|
|
535
|
+//
|
|
|
536
|
+// $yj_amount = $merchant_data['brokerage_price'] + $yj_amount_90;
|
|
|
537
|
+// $fgj_amount = $merchant_data['fugou'] + $fgj_amount_10;
|
|
|
538
|
+// $this->fugou_user_log($merchant_data['uid'],$fgj_amount_10,$store_order_data['order_id'],1,1);
|
|
|
539
|
+//
|
|
|
540
|
+//
|
|
|
541
|
+//
|
|
|
542
|
+// //Db::name('user')->where('uid',$merchant_data['uid'])->update(['brokerage_price'=>$yj_amount,'fugou'=>$fgj_amount]);
|
|
|
543
|
+// //推广佣金
|
|
|
544
|
+// $this->bill_user_log($merchant_data['uid'],$yj_amount_90,$store_order_data['order_id'],3,$store_order_data['order_sn'],'推广获得佣金',$store_order_data['mer_id']);
|
|
|
545
|
+// }
|
|
|
546
|
+//
|
|
|
547
|
+// }
|
|
548
|
548
|
|
|
549
|
549
|
|
|
550
|
550
|
$fzone_paytype = json_decode($store_order_data['fzone_paytype'],true);
|
|
|
@@ -587,30 +587,30 @@ class Notify
|
|
587
|
587
|
|
|
588
|
588
|
}
|
|
589
|
589
|
|
|
590
|
|
- //会员专区,给用户升级判断
|
|
591
|
|
- $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
|
|
592
|
|
- // 初始化总和变量
|
|
593
|
|
- $totalPayPrice = 0;
|
|
594
|
|
-
|
|
595
|
|
- // 遍历查询结果
|
|
596
|
|
- foreach ($orderList as $order) {
|
|
597
|
|
- // 累加 pay_price
|
|
598
|
|
- $totalPayPrice += $order['pay_price'];
|
|
599
|
|
- }
|
|
600
|
|
-
|
|
601
|
|
- $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
|
|
602
|
|
-
|
|
603
|
|
- if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
|
|
604
|
|
-
|
|
605
|
|
- if ($userdata['user_group'] <= 1) {
|
|
606
|
|
- Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
|
|
607
|
|
- }
|
|
608
|
|
-
|
|
609
|
|
- } else if ($totalPayPrice >= 11800) {
|
|
610
|
|
- if ($userdata['user_group'] <= 2) {
|
|
611
|
|
- Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
|
|
612
|
|
- }
|
|
613
|
|
- }
|
|
|
590
|
+ //会员专区,给用户升级判断 todo 疑似重复升级代码先做注释
|
|
|
591
|
+// $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
|
|
|
592
|
+// // 初始化总和变量
|
|
|
593
|
+// $totalPayPrice = 0;
|
|
|
594
|
+//
|
|
|
595
|
+// // 遍历查询结果
|
|
|
596
|
+// foreach ($orderList as $order) {
|
|
|
597
|
+// // 累加 pay_price
|
|
|
598
|
+// $totalPayPrice += $order['pay_price'];
|
|
|
599
|
+// }
|
|
|
600
|
+//
|
|
|
601
|
+// $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
|
|
|
602
|
+//
|
|
|
603
|
+// if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
|
|
|
604
|
+//
|
|
|
605
|
+// if ($userdata['user_group'] <= 1) {
|
|
|
606
|
+// Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
|
|
|
607
|
+// }
|
|
|
608
|
+//
|
|
|
609
|
+// } else if ($totalPayPrice >= 11800) {
|
|
|
610
|
+// if ($userdata['user_group'] <= 2) {
|
|
|
611
|
+// Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
|
|
|
612
|
+// }
|
|
|
613
|
+// }
|
|
614
|
614
|
|
|
615
|
615
|
|
|
616
|
616
|
} else {
|
|
|
@@ -1669,9 +1669,8 @@ class Notify
|
|
1669
|
1669
|
|
|
1670
|
1670
|
}
|
|
1671
|
1671
|
}
|
|
1672
|
|
- $ds = 1;
|
|
1673
|
1672
|
}
|
|
1674
|
|
-
|
|
|
1673
|
+ $ds = 1;
|
|
1675
|
1674
|
}
|
|
1676
|
1675
|
|
|
1677
|
1676
|
|