diff --git a/app/Services/DistributeService.php b/app/Services/DistributeService.php index f7360900..3c0ffa22 100644 --- a/app/Services/DistributeService.php +++ b/app/Services/DistributeService.php @@ -3,11 +3,11 @@ namespace App\Services; use App\Enums\PayWay; -use App\Models\{User, Order, SalesValueLog, Agent, OrderProfit, SocialiteUser}; -use App\Services\Payment\WxpayService; use App\Enums\SocialiteType; use App\Exceptions\BizException; use App\Exceptions\WeChatPayException; +use App\Models\{User, Order, SalesValueLog, Agent, OrderProfit, SocialiteUser}; +use App\Services\Payment\WxpayService; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; @@ -76,6 +76,11 @@ class DistributeService */ public function storeByOrder(Order $order) { + // 使用积分抵扣的订单不返利 + if ($order->point_discount_amount > 0) { + return; + } + $sales_value = $order->sales_value; $user = $order->user;