fix(partner): 修复30天保活倒计时方案A精确秒级顺延并实现HL规范昵称生成规则
这个提交包含在:
@@ -273,23 +273,8 @@ class Agent extends Commission
|
||||
$attached = \addons\shopro\service\partner\IdentityService::attachAgent($userAgent);
|
||||
$user->setRelation('agent', $attached);
|
||||
|
||||
$last = intval($attached['last_self_order_time'] ?? 0);
|
||||
$isActive = !empty($attached['active_30d']);
|
||||
|
||||
if ($isActive) {
|
||||
if ($last > 0) {
|
||||
$daysPassed = floor(($now - $last) / 86400);
|
||||
$remaining = max(0, intval($windowDays - $daysPassed));
|
||||
$user->active_status = ($remaining <= 5) ? 'expiring' : 'active';
|
||||
$user->days_remaining = $remaining;
|
||||
} else {
|
||||
$user->active_status = 'active';
|
||||
$user->days_remaining = $windowDays;
|
||||
}
|
||||
} else {
|
||||
$user->active_status = 'inactive';
|
||||
$user->days_remaining = 0;
|
||||
}
|
||||
$user->active_status = $attached['active_status'] ?? 'inactive';
|
||||
$user->days_remaining = $attached['days_remaining'] ?? 0;
|
||||
|
||||
$user->order_count = intval($userAgent['child_order_count_0'] ?? 0);
|
||||
$user->consume_amount = \addons\shopro\service\partner\IdentityService::formatMoney($userAgent['child_order_money_0'] ?? ($user->total_consume ?? 0));
|
||||
|
||||
在新工单中引用
屏蔽一个用户