From e42f4e00528985215e72468f2409069ad665cbfd Mon Sep 17 00:00:00 2001 From: Jing Li Date: Tue, 7 Nov 2023 13:52:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=B8=8D=E8=BF=94=E5=88=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/DistributeService.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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;