changeHotTop.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  13. // +----------------------------------------------------------------------
  14. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  15. // +----------------------------------------------------------------------
  16. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  17. // +----------------------------------------------------------------------
  18. // | Author: CRMEB Team <admin@crmeb.com>
  19. // +----------------------------------------------------------------------
  20. declare (strict_types=1);
  21. namespace app\command;
  22. use crmeb\jobs\SyncProductTopJob;
  23. use think\console\Command;
  24. use think\console\Input;
  25. use think\console\Output;
  26. use think\facade\Queue;
  27. class changeHotTop extends Command
  28. {
  29. protected function configure()
  30. {
  31. // 指令配置
  32. $this->setName('change:hotTop')
  33. ->setDescription('清楚缓存:php think change:hotTop');
  34. }
  35. /**
  36. * TODO
  37. * @param Input $input
  38. * @param Output $output
  39. * @return int|void|null
  40. * @author Qinii
  41. * @day 4/24/22
  42. */
  43. protected function execute(Input $input, Output $output)
  44. {
  45. Queue::push(SyncProductTopJob::class,[]);
  46. $output->writeln('执行成功');
  47. }
  48. }