修复随机号码前先按权重随机工单,并修复降权号码筛选与清理
This commit is contained in:
@@ -65,6 +65,7 @@ class Number extends Backend
|
||||
$this->assignconfig('statusList', $this->model->getStatusList());
|
||||
$this->assignconfig('manualManageList', $this->model->getManualManageList());
|
||||
$this->assignconfig('platformStatusList', $this->model->getPlatformStatusList());
|
||||
$this->assignconfig('ratioDeferredList', $this->model->getRatioDeferredList());
|
||||
$this->assignconfig('splitLinkFilterList', $this->buildNumberSplitLinkFilterList());
|
||||
$this->assignconfig('splitLinkSelectList', $this->buildSplitLinkSelectConfig());
|
||||
|
||||
@@ -525,6 +526,47 @@ class Number extends Backend
|
||||
$this->success(sprintf(__('Batch operate success'), $count));
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览待清理的无效降权号码数量
|
||||
*/
|
||||
public function cleanupdeferredpreview(): void
|
||||
{
|
||||
if (false === $this->request->isAjax()) {
|
||||
$this->error(__('Invalid parameters'));
|
||||
}
|
||||
|
||||
$service = new \app\common\service\SplitNumberRatioDeferredService();
|
||||
$adminIds = $this->dataLimit ? $this->getDataLimitAdminIds() : null;
|
||||
$count = $service->countInvalidDeferred(is_array($adminIds) ? $adminIds : null);
|
||||
|
||||
$this->success('', null, ['count' => $count]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理无效降权号码池(无落地页访问基线却标记 ratio_deferred=1 的记录)
|
||||
*/
|
||||
public function cleanupdeferred(): void
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->error(__('Invalid parameters'));
|
||||
}
|
||||
|
||||
$service = new \app\common\service\SplitNumberRatioDeferredService();
|
||||
$adminIds = $this->dataLimit ? $this->getDataLimitAdminIds() : null;
|
||||
|
||||
try {
|
||||
$count = $service->cleanupInvalidDeferred(is_array($adminIds) ? $adminIds : null);
|
||||
} catch (\Throwable $e) {
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
|
||||
if ($count <= 0) {
|
||||
$this->success(__('Ratio deferred cleanup none'));
|
||||
}
|
||||
|
||||
$this->success(sprintf(__('Ratio deferred cleanup success'), $count));
|
||||
}
|
||||
|
||||
/**
|
||||
* 排除不可由表单提交的字段
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user