Sfoglia il codice sorgente

单个词Log输出生成的词表

visuddhinanda 2 anni fa
parent
commit
b034ae6bf4
1 ha cambiato i file con 11 aggiunte e 1 eliminazioni
  1. 11 1
      app/Console/Commands/UpgradeDictSysRegular.php

+ 11 - 1
app/Console/Commands/UpgradeDictSysRegular.php

@@ -19,7 +19,7 @@ class UpgradeDictSysRegular extends Command
 {
     /**
      * The name and signature of the console command.
-     * php artisan upgrade:regular
+     * php artisan upgrade:regular jāta
      * @var string
      */
     protected $signature = 'upgrade:regular {word?} {--debug}';
@@ -127,6 +127,16 @@ class UpgradeDictSysRegular extends Command
 			$bar->advance();
 		}
 		$bar->finish();
+        if(!empty($this->argument('word'))){
+			$declensions = UserDict::where('dict_id',$dict_id)
+                            ->where('parent',$this->argument('word'))
+                            ->select('word')
+                            ->groupBy('word')
+                            ->get();
+            foreach ($declensions as $key => $word) {
+                Log::debug($word->word);
+            }
+		}
 		//删除旧数据
 		$table = UserDict::where('dict_id',$dict_id);
 		if(!empty($this->argument('word'))){