修改:立即返仅每个订单第一个人获得,之后不在有人获得

This commit is contained in:
wuhui_zzw 2024-05-31 14:02:48 +08:00
parent 0918ba16fb
commit a62724ab02
1 changed files with 10 additions and 1 deletions

View File

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