UpgradeTestData.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * 局部刷新语料库
  4. */
  5. namespace App\Console\Commands;
  6. use App\Tools\Tools;
  7. use Illuminate\Console\Command;
  8. class UpgradeTestData extends Command
  9. {
  10. /**
  11. * The name and signature of the console command.
  12. *
  13. * @var string
  14. */
  15. protected $signature = 'upgrade:test.data {book}';
  16. /**
  17. * The console command description.
  18. *
  19. * @var string
  20. */
  21. protected $description = 'Command description';
  22. /**
  23. * Create a new command instance.
  24. *
  25. * @return void
  26. */
  27. public function __construct()
  28. {
  29. parent::__construct();
  30. }
  31. /**
  32. * Execute the console command.
  33. *
  34. * @return int
  35. */
  36. public function handle()
  37. {
  38. if (Tools::isStop()) {
  39. return 0;
  40. }
  41. $this->call('init:cs6sentence', [$this->argument('book')]);
  42. $this->call('upgrade:wbw.template', [$this->argument('book')]);
  43. $this->call('upgrade:chapter.dynamic.weekly', ['--book' => $this->argument('book'), '--offset' => 300]);
  44. $this->call('upgrade:palitext', [$this->argument('book')]);
  45. $this->call('upgrade:compound', ['--book' => $this->argument('book')]);
  46. return 0;
  47. }
  48. }