Przeglądaj źródła

vr支付å奖励做舍去

hefei 1 rok temu
rodzic
commit
3281302384

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

@@ -9639,8 +9639,8 @@ class StoreOrderRepository extends BaseRepository
9639
                     $rate = static::getUserGroupRate($spread_data['user_group']);
9639
                     $rate = static::getUserGroupRate($spread_data['user_group']);
9640
 
9640
 
9641
                     if ($spread_data['user_group'] == 1) {
9641
                     if ($spread_data['user_group'] == 1) {
9642
-                        $yj_amount_90 = bcmul($pv, $rate, 2) * 0.9;
9643
-                        $fgj_amount_10 = bcmul($pv, $rate, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9642
+                        $yj_amount_90 = bcmul($pv * 0.9, $rate, 2);
9643
+                        $fgj_amount_10 = bcmul($pv * 0.1, $rate, 2);//推广者的佣金抽10%到个人复购金
9644
 
9644
 
9645
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9645
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9646
 
9646
 
@@ -9654,8 +9654,8 @@ class StoreOrderRepository extends BaseRepository
9654
                     } else if ($spread_data['user_group'] > 1) {
9654
                     } else if ($spread_data['user_group'] > 1) {
9655
 
9655
 
9656
                         $ssf = bcmul($pv, $rate, 2);
9656
                         $ssf = bcmul($pv, $rate, 2);
9657
-                        $yj_amount_90 = bcmul($pv, $rate, 2) * 0.9;
9658
-                        $fgj_amount_10 = bcmul($pv, $rate, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9657
+                        $yj_amount_90 = bcmul($pv * 0.9, $rate, 2);
9658
+                        $fgj_amount_10 = bcmul($pv * 0.1, $rate, 2);//推广者的佣金抽10%到个人复购金
9659
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9659
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9660
 
9660
 
9661
                         //贡献值
9661
                         //贡献值
@@ -9675,8 +9675,8 @@ class StoreOrderRepository extends BaseRepository
9675
                     $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9675
                     $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9676
                     if (!empty($merchant_user_data)) {
9676
                     if (!empty($merchant_user_data)) {
9677
                         //给推广者分配佣金
9677
                         //给推广者分配佣金
9678
-                        $yj_amount_90 = bcmul($pv, 0.05, 2) * 0.9;
9679
-                        $fgj_amount_10 = bcmul($pv, 0.05, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9678
+                        $yj_amount_90 = bcmul($pv * 0.9, 0.05, 2);
9679
+                        $fgj_amount_10 = bcmul($pv * 0.1, 0.05, 2);//推广者的佣金抽10%到个人复购金
9680
                         //推广佣金
9680
                         //推广佣金
9681
                         $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $store_order_data['order_sn'], '推广获得佣金' . $yj_amount_90, $store_order_data['mer_id'], 0);
9681
                         $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $store_order_data['order_sn'], '推广获得佣金' . $yj_amount_90, $store_order_data['mer_id'], 0);
9682
                     }
9682
                     }
@@ -9868,8 +9868,8 @@ class StoreOrderRepository extends BaseRepository
9868
                     $rate = static::getUserGroupRate($spread_data['user_group']);
9868
                     $rate = static::getUserGroupRate($spread_data['user_group']);
9869
                     if ($spread_data['user_group'] > 1) {
9869
                     if ($spread_data['user_group'] > 1) {
9870
                         $ssf = bcmul($pv, $rate, 2);
9870
                         $ssf = bcmul($pv, $rate, 2);
9871
-                        $yj_amount_90 = bcmul($pv, $rate, 2) * 0.9;
9872
-                        $fgj_amount_10 = bcmul($pv, $rate, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9871
+                        $yj_amount_90 = bcmul($pv * 0.9, $rate, 2);
9872
+                        $fgj_amount_10 = bcmul($pv * 0.1, $rate, 2);//推广者的佣金抽10%到个人复购金
9873
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9873
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9874
 
9874
 
9875
                         //贡献值
9875
                         //贡献值
@@ -9886,8 +9886,8 @@ class StoreOrderRepository extends BaseRepository
9886
                     if ($spread_data['user_group'] == 1) {
9886
                     if ($spread_data['user_group'] == 1) {
9887
                         //给推广者分配佣金
9887
                         //给推广者分配佣金
9888
 
9888
 
9889
-                        $yj_amount_90 = bcmul($pv, $rate, 2) * 0.9;
9890
-                        $fgj_amount_10 = bcmul($pv, $rate, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9889
+                        $yj_amount_90 = bcmul($pv * 0.9, $rate, 2);
9890
+                        $fgj_amount_10 = bcmul($pv * 0.1, $rate, 2);//推广者的佣金抽10%到个人复购金
9891
 
9891
 
9892
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9892
                         $this->fugou_user_log($spread_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9893
 
9893
 
@@ -9906,8 +9906,8 @@ class StoreOrderRepository extends BaseRepository
9906
                     $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9906
                     $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9907
                     if (!empty($merchant_user_data)) {
9907
                     if (!empty($merchant_user_data)) {
9908
                         //给推广者分配佣金
9908
                         //给推广者分配佣金
9909
-                        $yj_amount_90 = bcmul($pv, 0.05, 2) * 0.9;
9910
-                        $fgj_amount_10 = bcmul($pv, 0.05, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9909
+                        $yj_amount_90 = bcmul($pv * 0.9, 0.05, 2);
9910
+                        $fgj_amount_10 = bcmul($pv * 0.1, 0.05, 2);//推广者的佣金抽10%到个人复购金
9911
                         $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9911
                         $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1);
9912
                         //推广佣金
9912
                         //推广佣金
9913
                         $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $group_order['group_order_sn'], '推广获得佣金' . $yj_amount_90, $store_order_data['mer_id'], 0);
9913
                         $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $group_order['group_order_sn'], '推广获得佣金' . $yj_amount_90, $store_order_data['mer_id'], 0);