- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明 Made-with: Cursor
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Author: ScottPan Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace app\jobs\agent;
|
|
|
|
use crmeb\basic\BaseJobs;
|
|
use app\services\agent\AgentManageServices;
|
|
use crmeb\traits\QueueTrait;
|
|
|
|
/**
|
|
* 自动解除上下级
|
|
* Class AutoAgentJob
|
|
* @package app\jobs\user
|
|
*/
|
|
class AutoAgentJob extends BaseJobs
|
|
{
|
|
use QueueTrait;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
protected static function queueName()
|
|
{
|
|
return 'CRMEB_PRO_TASK';
|
|
}
|
|
|
|
/**
|
|
* @param $page
|
|
* @param $limit
|
|
* @param $where
|
|
*/
|
|
public function doJob($page, $limit, $where)
|
|
{
|
|
//自动解绑上级绑定
|
|
try {
|
|
/** @var AgentManageServices $agentManage */
|
|
$agentManage = app()->make(AgentManageServices::class);
|
|
$agentManage->startRemoveSpread($page, $limit, $where);
|
|
} catch (\Throwable $e) {
|
|
response_log_write([
|
|
'message' => '自动解除上级绑定失败,失败原因:[' . class_basename($this) . ']' . $e->getMessage(),
|
|
'file' => $e->getFile(),
|
|
'line' => $e->getLine()
|
|
]);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
}
|