作者 何书鹏

购买会员绑定上下级关系

@@ -59,7 +59,7 @@ class PackageOrder extends Model @@ -59,7 +59,7 @@ class PackageOrder extends Model
59 $orderData['month'] = $package['month']; 59 $orderData['month'] = $package['month'];
60 $orderData['pay_fee'] = $package['package_price']; 60 $orderData['pay_fee'] = $package['package_price'];
61 $orderData['remark'] = $remark; 61 $orderData['remark'] = $remark;
62 - $orderData['inviter_id'] = !empty($inviter_id) ? $inviter_id : 0; // 邀请人ID 62 + $orderData['inviter_id'] = (!empty($inviter_id) && $inviter_id != $user->id) ? $inviter_id : 0; // 邀请人ID
63 $order = new PackageOrder(); 63 $order = new PackageOrder();
64 $order->allowField(true)->save($orderData); 64 $order->allowField(true)->save($orderData);
65 65