You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AutoAgentJob.php 980B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace app\jobs\agent;
  3. use crmeb\basic\BaseJobs;
  4. use app\services\agent\AgentManageServices;
  5. use crmeb\traits\QueueTrait;
  6. use think\facade\Log;
  7. /**
  8. * 自动解除上下级
  9. * Class AutoAgentJob
  10. * @package app\jobs\user
  11. */
  12. class AutoAgentJob extends BaseJobs
  13. {
  14. use QueueTrait;
  15. /**
  16. * @return string
  17. */
  18. protected static function queueName()
  19. {
  20. return 'CRMEB_PRO_TASK';
  21. }
  22. /**
  23. * @param $page
  24. * @param $limit
  25. * @param $where
  26. */
  27. public function doJob($page, $limit, $where)
  28. {
  29. //自动解绑上级绑定
  30. try {
  31. /** @var AgentManageServices $agentManage */
  32. $agentManage = app()->make(AgentManageServices::class);
  33. return $agentManage->startRemoveSpread($page, $limit, $where);
  34. } catch (\Throwable $e) {
  35. Log::error('自动解除上级绑定失败,失败原因:[' . class_basename($this) . ']' . $e->getMessage());
  36. }
  37. }
  38. }