From a62724ab021413bab5a811767be8f9e6c48338e7 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Fri, 31 May 2024 14:02:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E7=AB=8B=E5=8D=B3?= =?UTF-8?q?=E8=BF=94=E4=BB=85=E6=AF=8F=E4=B8=AA=E8=AE=A2=E5=8D=95=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E4=BA=BA=E8=8E=B7=E5=BE=97=EF=BC=8C=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E5=9C=A8=E6=9C=89=E4=BA=BA=E8=8E=B7=E5=BE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team-dividend/src/services/TeamReturnService.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/team-dividend/src/services/TeamReturnService.php b/plugins/team-dividend/src/services/TeamReturnService.php index 0acade9f..0d1247c2 100644 --- a/plugins/team-dividend/src/services/TeamReturnService.php +++ b/plugins/team-dividend/src/services/TeamReturnService.php @@ -264,7 +264,16 @@ class TeamReturnService if($dividend_amount <= 0) continue; - + // 判断:经销商分红 立即返佣 仅一个人获得,如果已经有人获得则该订单不在有人获得 + if($monthIndex == 0){ + $isGrant = (int)TeamDividendModel::where('order_sn',$this->order->order_sn) + ->where('type', 8) + ->value('id'); + if($isGrant > 0){ + \Log::debug("当前订单的立即返已经有人获得(id:{$isGrant}),不在发放"); + continue; + } + } // todo 调试中... // if($monthIndex == 0 || $monthIndex == 1) {