hrjy %!s(int64=2) %!d(string=hai) anos
pai
achega
adb362639d
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      app/models/store/StoreOrder.php

+ 4 - 2
app/models/store/StoreOrder.php

@@ -812,8 +812,10 @@ class StoreOrder extends BaseModel
             $jl = $order['pay_price'] * sys_config('push')/100;
 
             $spread = User::where('uid', $user['spread_uid'])->find();
-            User::where('uid', $user['spread_uid'])->inc('brokerage_price', $jl)->update();
-            UserBill::income('佣金', $user['spread_uid'], 'now_money', 'brokerage', $jl, $user['uid'], $spread['brokerage_price']+ $jl, '直推佣金');
+            if ($spread['is_vip']  == 1){
+                User::where('uid', $user['spread_uid'])->inc('brokerage_price', $jl)->update();
+                UserBill::income('佣金', $user['spread_uid'], 'now_money', 'brokerage', $jl, $user['uid'], $spread['brokerage_price']+ $jl, '直推佣金');
+            }
         }else{
             $jl = $order['pay_price'] * sys_config('push')/100;