UpgradeTestData.php 1.2 KB

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