xialei vor 1 Jahr
Ursprung
Commit
e7cab7705e
1 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen
  1. 7 7
      app/common/repositories/store/order/StoreOrderRepository.php

+ 7 - 7
app/common/repositories/store/order/StoreOrderRepository.php

@@ -3808,17 +3808,17 @@ class StoreOrderRepository extends BaseRepository
3808 3808
                 $yongjinbili = 17;
3809 3809
             }
3810 3810
 
3811
+            //计算出佣金
3811 3812
             $yongjin = $pvfee * $yongjinbili / 100;
3812
-            // 佣金百分之90进入佣金池
3813
-            // $tuiguanyongjin = round($yongjin * 0.9, 2);
3814
-            $tuiguanyongjin = bcmul($pvfee, $yongjinbili / 100, 2);
3815 3813
 
3816
-
3817
-            $tuiYongmark = "推荐消费获得佣金" . $tuiguanyongjin;
3814
+            // 佣金百分之90进入佣金池  佣金百分之10进入复购金
3815
+            $tuiguanyongjin = round($yongjin * 0.9, 2);
3816
+            $tuiguanfugou = round($yongjin * 0.1, 2);
3818 3817
 
3819 3818
             //end会费
3820 3819
             //sat存养老金
3821 3820
             $tuiYongzhoutitle = "推广佣金 ";
3821
+            $tuiYongmark = "推荐消费获得佣金" . $tuiguanyongjin;
3822 3822
             $commission_yong_type = 3;
3823 3823
             if ($tuiguanyongjin >= 0.01) {
3824 3824
                 $this->add_bill($tuiYongzhoutitle, $tuiguanyongjin, $sprerdUser["uid"], $tuiYongmark, $commission_yong_type, $order_sn, $order_id, $order["mer_id"], 0, 0, $order["type_shop"]);
@@ -3826,12 +3826,12 @@ class StoreOrderRepository extends BaseRepository
3826 3826
                 Db::name('log')->insert(['data' => '订单号:' . $order_sn . '付款额度较低或 商家、平台设置的返佣比例较低,佣金低于0.01无法入库 特此记录!']);
3827 3827
             }
3828 3828
 
3829
-            if($yongjin >= 0.1){
3829
+            if($tuiguanfugou >= 0.1){
3830 3830
                 // 佣金百分之10进入复购金
3831 3831
                 $orderThird = app()->make(UserThirdRepository::class);
3832 3832
                 //复购金
3833 3833
                 $orderThird->yuguFugou(
3834
-                    $yongjin,
3834
+                    $tuiguanfugou,
3835 3835
                     $sprerdUser["uid"],
3836 3836
                     $order_sn,
3837 3837
                     $order["type_shop"]