修复随机号码前先按权重随机工单,并修复降权号码筛选与清理
This commit is contained in:
@@ -42,6 +42,7 @@ class Number extends Model
|
||||
'status_text',
|
||||
'manual_manage_text',
|
||||
'platform_status_text',
|
||||
'ratio_deferred_text',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -81,6 +82,17 @@ class Number extends Model
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function getRatioDeferredList(): array
|
||||
{
|
||||
return [
|
||||
'0' => __('Ratio deferred no'),
|
||||
'1' => __('Ratio deferred yes'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
@@ -158,6 +170,13 @@ class Number extends Model
|
||||
return $list[$key] ?? $key;
|
||||
}
|
||||
|
||||
public function getRatioDeferredTextAttr($value, $data): string
|
||||
{
|
||||
$key = (string) ((int) ($data['ratio_deferred'] ?? 0));
|
||||
$list = $this->getRatioDeferredList();
|
||||
return $list[$key] ?? $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据链接码生成完整分流 URL
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user