style(commission): 将团队中心吸顶筛选胶囊标签由合伙股东调整为团队成员
这个提交包含在:
@@ -201,16 +201,23 @@ class Agent extends Commission
|
||||
|
||||
// 6. 身份与活跃状态过滤
|
||||
if ($filterType === 'partner') {
|
||||
// 团队成员:已完成自购转化的正式品酒师及所有进阶成员(排除未自购消费的纯游客)
|
||||
$partnerUserIds = AgentModel::where('status', 'in', ['normal', 'freeze'])
|
||||
->where(function ($q) {
|
||||
$q->where('level', '>=', 2)
|
||||
->whereOr('is_venue', 1)
|
||||
->whereOr('is_county', 1);
|
||||
->whereOr('is_county', 1)
|
||||
->whereOr('is_partner', 1)
|
||||
->whereOr('child_order_money_0', '>', 0);
|
||||
})->column('user_id');
|
||||
if (empty($partnerUserIds)) {
|
||||
$purchasedUserIds = !empty($level1Ids)
|
||||
? UserModel::whereIn('id', $level1Ids)->where('total_consume', '>', 0)->column('id')
|
||||
: [];
|
||||
$memberUserIds = array_values(array_unique(array_merge($partnerUserIds, $purchasedUserIds)));
|
||||
if (empty($memberUserIds)) {
|
||||
$query->whereRaw('1=0');
|
||||
} else {
|
||||
$query->whereIn('u.id', $partnerUserIds);
|
||||
$query->whereIn('u.id', $memberUserIds);
|
||||
}
|
||||
} elseif ($filterType === 'active') {
|
||||
$activeUserIds = AgentModel::where('last_self_order_time', '>=', $expiringStart)->column('user_id');
|
||||
|
||||
在新工单中引用
屏蔽一个用户