Jelajahi Sumber

特价订单不参与分佣

ouyang 3 hari lalu
induk
melakukan
9d877a5141

+ 3 - 1
biz-hd/distribution/classes/DistributionCommissionClass.php

@@ -194,7 +194,9 @@ class DistributionCommissionClass
         if ((int)($order->status ?? 0) === OrderClass::ORDER_STATUS_CANCEL) {
             throw new \Exception('订单已取消,无法计佣');
         }
-
+        if ((int)($order->groupBuyId ?? 0) > 0 || (int)($order->hasSeckill ?? 0) == 1) {
+            throw new \Exception('特价订单不参与分佣');
+        }
         $shop = ShopClass::getById($shopId, true);
         $mainId = (int)($shop->mainId ?? 0);
         $rule = DistributionRuleClass::getRule($shopId, $mainId);