hrjy 2 anos atrás
pai
commit
19c5727b6b
2 arquivos alterados com 13 adições e 9 exclusões
  1. 3 1
      app/common.php
  2. 10 8
      app/models/store/StoreOrder.php

+ 3 - 1
app/common.php

@@ -643,8 +643,10 @@ if (!function_exists('getParent')){
             $parent = getDataFind('user',array('uid'=>$member['spread_uid']));
             if ($parent['level'] >= 2){
                 $arr[]= $parent['uid'];
+            }else{
+                getParent($parent['uid']);
             }
-            getParent($parent['uid']);
+
         }
         return $arr;
 

+ 10 - 8
app/models/store/StoreOrder.php

@@ -911,14 +911,16 @@ class StoreOrder extends BaseModel
             $top1['brokerage_price'] += 130;
             $price = 130;
         }
-        if ($top1['spread_uid']){
-            $user = getParent($top1['uid']);
-            if ($user){
-                foreach ($user as $v){
-                    $top =   User::where('uid', $v)->find();
-                    $top['brokerage_price'] += 90;
-                    $top->save();
-                    UserBill::income('佣金', $top1['uid'], 'now_money', 'brokerage', 90, 0, $top['brokerage_price'], '间推399礼包奖励');
+        if ($price < 130){
+            if ($top1['spread_uid']){
+                $user = getParent($top1['uid']);
+                if ($user){
+                    foreach ($user as $v){
+                        $top =   User::where('uid', $v)->find();
+                        $top['brokerage_price'] += 90;
+                        $top->save();
+                        UserBill::income('佣金', $top['uid'], 'now_money', 'brokerage', 90, 0, $top['brokerage_price'], '间推399礼包奖励');
+                    }
                 }
             }
         }