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) {