Kaynağa Gözat

config app 添加的内容移动到mint

visuddhinanda 2 yıl önce
ebeveyn
işleme
8d0fbcbb6a
38 değiştirilmiş dosya ile 90 ekleme ve 126 silme
  1. 1 1
      app/Console/Commands/InitCs6sentence.php
  2. 3 3
      app/Console/Commands/InitDependence.php
  3. 2 2
      app/Console/Commands/InitSystemChannel.php
  4. 1 1
      app/Console/Commands/InitSystemDict.php
  5. 1 1
      app/Console/Commands/InstallPaliSeries.php
  6. 15 15
      app/Console/Commands/InstallPaliText.php
  7. 6 6
      app/Console/Commands/InstallWordAll.php
  8. 5 5
      app/Console/Commands/InstallWordBook.php
  9. 5 5
      app/Console/Commands/InstallWordIndex.php
  10. 5 5
      app/Console/Commands/InstallWordStatistics.php
  11. 1 1
      app/Console/Commands/UpgradeCommunityTerm.php
  12. 2 2
      app/Console/Commands/UpgradeDict.php
  13. 2 2
      app/Console/Commands/UpgradePaliText.php
  14. 1 1
      app/Console/Commands/UpgradePaliTextId.php
  15. 4 4
      app/Console/Commands/UpgradePaliTextTag.php
  16. 3 3
      app/Console/Commands/UpgradePaliToc.php
  17. 1 1
      app/Console/Commands/UpgradeQuote.php
  18. 1 1
      app/Console/Commands/UpgradeRelatedParagraph.php
  19. 1 1
      app/Console/Commands/UpgradeWbwTemplate.php
  20. 1 1
      app/Console/Commands/UpgradeWordPart.php
  21. 3 3
      app/Console/Commands/WebHookArticleNew.php
  22. 3 3
      app/Console/Kernel.php
  23. 2 2
      app/Http/Api/ChannelApi.php
  24. 1 1
      app/Http/Api/DictApi.php
  25. 1 1
      app/Http/Api/TemplateRender.php
  26. 4 4
      app/Http/Controllers/CorpusController.php
  27. 1 1
      app/Http/Controllers/DhammaTermController.php
  28. 1 1
      app/Http/Controllers/ProgressImgController.php
  29. 1 1
      app/Http/Controllers/RelationController.php
  30. 1 1
      app/Http/Controllers/SentenceInfoController.php
  31. 1 1
      app/Http/Controllers/UserStatisticController.php
  32. 1 1
      app/Http/Controllers/VocabularyController.php
  33. 1 1
      app/Http/Resources/SearchResource.php
  34. 2 2
      app/Providers/AppServiceProvider.php
  35. 1 1
      app/Tools/Export.php
  36. 1 1
      app/Tools/Markdown.php
  37. 4 4
      app/Tools/TurboSplit.php
  38. 0 36
      config/app.php

+ 1 - 1
app/Console/Commands/InitCs6sentence.php

@@ -134,7 +134,7 @@ class InitCs6sentence extends Command
                     'create_time' => time()*1000,
 				]
 				);
-            $newRow->editor_uid = config("app.admin.root_uuid");
+            $newRow->editor_uid = config("mint.admin.root_uuid");
             $newRow->content = "<span>{$sent}</span>";
             $newRow->strlen = mb_strlen($sent,"UTF-8");
             $newRow->status = 10;

+ 3 - 3
app/Console/Commands/InitDependence.php

@@ -40,15 +40,15 @@ class InitDependence extends Command
     public function handle()
     {
 		#克隆依赖的数据仓库到本地
-		$depDir = $this->info(config("app.path.dependence"));
-		foreach ($this->info(config("app.dependence")) as $key => $value) {
+		$depDir = $this->info(config("mint.path.dependence"));
+		foreach ($this->info(config("mint.dependence")) as $key => $value) {
 			# code...
 			$process = new Process(['git','clone',$value->url,$depDir.'/'.$value->path]);
 			$process->run();
 			if(!$process->isSuccessful()){
 				throw new ProcessFailedException($process);
 			}
-			$this->info($process->getOutput());				
+			$this->info($process->getOutput());
 		}
         return 0;
     }

+ 2 - 2
app/Console/Commands/InitSystemChannel.php

@@ -106,7 +106,7 @@ class InitSystemChannel extends Command
             # code...
             $channel = Channel::firstOrNew([
                 'name' => $value['name'],
-                'owner_uid' => config("app.admin.root_uuid"),
+                'owner_uid' => config("mint.admin.root_uuid"),
             ]);
             if(empty($channel->id)){
                 $channel->id = app('snowflake')->id();
@@ -114,7 +114,7 @@ class InitSystemChannel extends Command
             $channel->type = $value['type'];
             $channel->lang = $value['lang'];
             $channel->editor_id = 0;
-            $channel->owner_uid = config("app.admin.root_uuid");
+            $channel->owner_uid = config("mint.admin.root_uuid");
             $channel->create_time = time()*1000;
             $channel->modify_time = time()*1000;
             $channel->save();

+ 1 - 1
app/Console/Commands/InitSystemDict.php

@@ -77,7 +77,7 @@ class InitSystemDict extends Command
             # code...
             $channel = DictInfo::firstOrNew([
                 'name' => $value['name'],
-                'owner_id' => config("app.admin.root_uuid"),
+                'owner_id' => config("mint.admin.root_uuid"),
             ]);
             $channel->shortname = $value['shortname'];
             $channel->description = $value['description'];

+ 1 - 1
app/Console/Commands/InstallPaliSeries.php

@@ -48,7 +48,7 @@ class InstallPaliSeries extends Command
 			BookTitle::where('book','>',0)->delete();
 
 		// 打开csv文件并读取数据
-			$strFileName = config("app.path.pali_title") . "/pali_serieses.csv";
+			$strFileName = config("mint.path.pali_title") . "/pali_serieses.csv";
 			if(!file_exists($strFileName)){
 				return 1;
 			}

+ 15 - 15
app/Console/Commands/InstallPaliText.php

@@ -51,7 +51,7 @@ class InstallPaliText extends Command
 		}else if(empty($_to)){
 			$_to = $_from;
 		}
-		$fileListFileName = config("app.path.palitext_filelist");
+		$fileListFileName = config("mint.path.palitext_filelist");
 
 		$filelist = array();
 
@@ -61,18 +61,18 @@ class InstallPaliText extends Command
 		}
 		$bar = $this->output->createProgressBar($_to-$_from+1);
 
-		for ($from=$_from; $from <=$_to ; $from++) { 
+		for ($from=$_from; $from <=$_to ; $from++) {
 			# code...
-			
+
 			$fileSn = $from-1;
 			$FileName = $filelist[$fileSn][1];
-	
-			$dirXmlBase = config("app.path.palicsv") . "/";
+
+			$dirXmlBase = config("mint.path.palicsv") . "/";
 			$GLOBALS['data'] = array();
-    
+
 			// 打开vri html文件并读取数据
 			$pali_text_array = array();
-			$htmlFile = config("app.path.palitext") .'/'. $FileName.'.htm';
+			$htmlFile = config("mint.path.palitext") .'/'. $FileName.'.htm';
 			if (($fpPaliText = fopen($htmlFile, "r")) !== false) {
 				while (($data = fgets($fpPaliText)) !== false) {
 					if (substr($data, 0, 2) === "<p") {
@@ -85,9 +85,9 @@ class InstallPaliText extends Command
 				$this->error( "can not pali text file. filename=" . $htmlFile . PHP_EOL) ;
 				Log::error( "can not pali text file. filename=" . $htmlFile . PHP_EOL) ;
 			}
-			
+
 			$inputRow = 0;
-			$csvFile = config("app.path.palicsv") .'/'. $FileName .'/'. $FileName.'_pali.csv';
+			$csvFile = config("mint.path.palicsv") .'/'. $FileName .'/'. $FileName.'_pali.csv';
 			if (($fp = fopen($csvFile, "r")) !== false) {
 				while (($data = fgetcsv($fp, 0, ',')) !== false) {
 					if ($inputRow > 0) {
@@ -106,19 +106,19 @@ class InstallPaliText extends Command
 				Log::error( "can not open csv file. filename=" . $csvFile. PHP_EOL) ;
 				continue;
 			}
-			
+
 			if (($inputRow - 1) != count($pali_text_array)) {
 				$this->error( "line count error $FileName ".PHP_EOL);
 				Log::error( "line count error $FileName ".PHP_EOL);
 			}
-							 
-		
+
+
 			#删除目标数据库中数据
 			PaliText::where('book', $from)->delete();
 
 
 			// 打开文件并读取数据
-			
+
 
 			DB::transaction(function () {
 				foreach ($GLOBALS['data'] as $oneParam) {
@@ -139,9 +139,9 @@ class InstallPaliText extends Command
 					];
 					PaliText::create($params);
 				}
-				
+
 			});
-			
+
 			$bar->advance();
 		}
 		$bar->finish();

+ 6 - 6
app/Console/Commands/InstallWordAll.php

@@ -56,14 +56,14 @@ class InstallWordAll extends Command
 
 		$bar = $this->output->createProgressBar($_to-$_from+1);
 
-		for ($book=$_from; $book <= $_to; $book++) { 
+		for ($book=$_from; $book <= $_to; $book++) {
 			Log::info("doing ".($book));
 			DB::transaction(function ()use($book) {
 				$fileSn = $book-1;
-				if (($fpoutput = fopen(config("app.path.paliword_book") . "/{$fileSn}_words.csv", "r")) !== false){
+				if (($fpoutput = fopen(config("mint.path.paliword_book") . "/{$fileSn}_words.csv", "r")) !== false){
 					#删除目标数据库中数据
-					WordList::where('book', $book)->delete();			
-					while (($data = fgetcsv($fpoutput, 0, ',')) !== false)  
+					WordList::where('book', $book)->delete();
+					while (($data = fgetcsv($fpoutput, 0, ',')) !== false)
 					{
 						$newData = [
 							'sn'=>$data[0],
@@ -72,9 +72,9 @@ class InstallWordAll extends Command
 							'wordindex'=>$data[3],
 							'bold'=>$data[4],
 						];
-						WordList::create($newData);				
+						WordList::create($newData);
 					}
-					return 0;			
+					return 0;
 				}else{
 					Log::error("open csv fail");
 					return 1;

+ 5 - 5
app/Console/Commands/InstallWordBook.php

@@ -56,7 +56,7 @@ class InstallWordBook extends Command
 
 		$bar = $this->output->createProgressBar($_to-$_from+1);
 
-		for ($book=$_from; $book <= $_to; $book++) { 
+		for ($book=$_from; $book <= $_to; $book++) {
 			Log::info("doing ".($book));
 
 			#删除目标数据库中数据
@@ -65,7 +65,7 @@ class InstallWordBook extends Command
 			//分类汇总得到单词表
 			$bookword = array();
 			$fileId = $book-1;
-			if (($fpoutput = fopen(config("app.path.paliword_book") . "/{$fileId}_words.csv", "r")) !== false) {
+			if (($fpoutput = fopen(config("mint.path.paliword_book") . "/{$fileId}_words.csv", "r")) !== false) {
 				$count = 0;
 				while (($data = fgetcsv($fpoutput, 0, ',')) !== false) {
 					$book = $data[1];
@@ -74,7 +74,7 @@ class InstallWordBook extends Command
 					} else {
 						$bookword[$data[3]] = 1;
 					}
-		
+
 					$count++;
 				}
 			}else{
@@ -88,7 +88,7 @@ class InstallWordBook extends Command
 						'wordindex'=>$key,
 						'count'=>$value,
 					];
-					BookWord::create($newData);				
+					BookWord::create($newData);
 				}
 			});
 			$bar->advance();
@@ -98,7 +98,7 @@ class InstallWordBook extends Command
 		$msg = "all done in ". time()-$startTime . "s";
 		$this->info($msg.PHP_EOL);
 		Log::info($msg);
-		
+
         return 0;
     }
 }

+ 5 - 5
app/Console/Commands/InstallWordIndex.php

@@ -47,13 +47,13 @@ class InstallWordIndex extends Command
 		Log::info($info);
 
 		#删除目标数据库中数据
-		WordIndex::where('id', '>',-1)->delete();	
+		WordIndex::where('id', '>',-1)->delete();
 
-		$scan = scandir(config("app.path.paliword_index"));
+		$scan = scandir(config("mint.path.paliword_index"));
 		$bar = $this->output->createProgressBar(count($scan));
 		foreach($scan as $filename) {
 			$bar->advance();
-			$filename = config("app.path.paliword_index")."/".$filename;
+			$filename = config("mint.path.paliword_index")."/".$filename;
 			if (is_file($filename)) {
 				Log::info("doing ".$filename);
 				DB::transaction(function ()use($filename) {
@@ -69,12 +69,12 @@ class InstallWordIndex extends Command
 								'is_base'=>$data[5],
 								'len'=>$data[6],
 							];
-							WordIndex::create($newData);	
+							WordIndex::create($newData);
 							$count++;
 						}
 						Log::info("insert ".$count);
 					}
-				});				
+				});
 			}
 		}
 		$bar->finish();

+ 5 - 5
app/Console/Commands/InstallWordStatistics.php

@@ -47,13 +47,13 @@ class InstallWordStatistics extends Command
 		Log::info($info);
 
 		#删除目标数据库中数据
-		WordStatistic::where('id', '>',-1)->delete();	
+		WordStatistic::where('id', '>',-1)->delete();
 
-		$scan = scandir(config("app.path.word_statistics"));
+		$scan = scandir(config("mint.path.word_statistics"));
 		$bar = $this->output->createProgressBar(count($scan));
 		foreach($scan as $filename) {
 			$bar->advance();
-			$filename = config("app.path.word_statistics")."/".$filename;
+			$filename = config("mint.path.word_statistics")."/".$filename;
 			if (is_file($filename)) {
 				Log::info("doing ".$filename);
 				DB::transaction(function ()use($filename) {
@@ -70,12 +70,12 @@ class InstallWordStatistics extends Command
 								'type'=>$data[6],
 								'length'=>$data[7],
 							];
-							WordStatistic::create($newData);	
+							WordStatistic::create($newData);
 							$count++;
 						}
 						Log::info("insert ".$count);
 					}
-				});				
+				});
 			}
 		}
 		$bar->finish();

+ 1 - 1
app/Console/Commands/UpgradeCommunityTerm.php

@@ -146,7 +146,7 @@ class UpgradeCommunityTerm extends Command
                             'word_en' =>Tools::getWordEn($word->word),
                             'meaning' => '',
                             'language' => $this->argument('lang'),
-                            'owner' => config("app.admin.root_uuid"),
+                            'owner' => config("mint.admin.root_uuid"),
                             'editor_id' => 0,
                             'create_time' => time()*1000,
                         ]

+ 2 - 2
app/Console/Commands/UpgradeDict.php

@@ -84,7 +84,7 @@ class UpgradeDict extends Command
 								$tableDict->src_lang = $this->dictInfo['meta']['src_lang'];
 								$tableDict->dest_lang = $this->dictInfo['meta']['dest_lang'];
 								$tableDict->rows = $this->dictInfo['meta']['rows'];
-								$tableDict->owner_id = config("app.admin.root_uuid");
+								$tableDict->owner_id = config("mint.admin.root_uuid");
 								$tableDict->meta = json_encode($this->dictInfo['meta']);
 								$tableDict->save();
 
@@ -216,7 +216,7 @@ class UpgradeDict extends Command
     public function handle()
     {
 		$this->info("upgrade dict start");
-		$this->scandict(config("app.path.dict_text"));
+		$this->scandict(config("mint.path.dict_text"));
 		$this->info("upgrade dict done");
 
         return 0;

+ 2 - 2
app/Console/Commands/UpgradePaliText.php

@@ -56,7 +56,7 @@ class UpgradePaliText extends Command
 			$_to = $_from;
 		}
 #载入文件列表
-		$fileListFileName = config("app.path.palitext_filelist");
+		$fileListFileName = config("mint.path.palitext_filelist");
 
 		$filelist = array();
 
@@ -72,7 +72,7 @@ class UpgradePaliText extends Command
 			$arrInserString = array();
 			#载入csv数据
 			$FileName = $filelist[$from-1][1];
-			$csvFile = config("app.path.pali_title") .'/'. $from.'_pali.csv';
+			$csvFile = config("mint.path.pali_title") .'/'. $from.'_pali.csv';
 			if (($fp = fopen($csvFile, "r")) !== false) {
                 Log::info("csv load:" . $csvFile);
 				while (($data = fgetcsv($fp, 0, ',')) !== false) {

+ 1 - 1
app/Console/Commands/UpgradePaliTextId.php

@@ -45,7 +45,7 @@ class UpgradePaliTextId extends Command
 
         $bar = $this->output->createProgressBar(PaliText::count());
         #载入csv数据
-        $csvFile = config("app.path.pali_title") .'/pali_text_uuid.csv';
+        $csvFile = config("mint.path.pali_title") .'/pali_text_uuid.csv';
         if (($fp = fopen($csvFile, "r")) === false) {
             $this->error( "can not open csv file. filename=" . $csvFile. PHP_EOL) ;
             Log::error( "can not open csv file. filename=" . $csvFile) ;

+ 4 - 4
app/Console/Commands/UpgradePaliTextTag.php

@@ -45,7 +45,7 @@ class UpgradePaliTextTag extends Command
         $startTime = time();
 
         #载入csv数据
-        $csvFile = config("app.path.pali_title") .'/pali_text_tag.csv';
+        $csvFile = config("mint.path.pali_title") .'/pali_text_tag.csv';
         if (($fp = fopen($csvFile, "r")) === false) {
             $this->error( "can not open csv file. filename=" . $csvFile. PHP_EOL) ;
             Log::error( "can not open csv file. filename=" . $csvFile) ;
@@ -58,7 +58,7 @@ class UpgradePaliTextTag extends Command
             if($inputRow%100==0){
                 $this->info($inputRow);
             }
-            
+
             //略过第一行标题行
             if ($inputRow == 1){
                 continue;
@@ -85,7 +85,7 @@ class UpgradePaliTextTag extends Command
                 foreach ($tags as $key => $tag) {
                     # code...
                     if(!empty($tag)){
-                        $tagRow = Tag::firstOrCreate(['name'=>$tag],['owner_id'=>config("app.admin.root_uuid")]);
+                        $tagRow = Tag::firstOrCreate(['name'=>$tag],['owner_id'=>config("mint.admin.root_uuid")]);
                         $tagmap = TagMap::firstOrCreate([
                                     'table_name' => 'pali_texts',
                                     'anchor_id' => $paliTextUuid,
@@ -99,7 +99,7 @@ class UpgradePaliTextTag extends Command
             }else{
                     $this->error("no palitext uuid book=$book para=$para ");
             }
-            
+
         }
         fclose($fp);
         $this->info(" $inputRow para $tagCount tags  finished. in ". time()-$startTime . "s");

+ 3 - 3
app/Console/Commands/UpgradePaliToc.php

@@ -62,7 +62,7 @@ class UpgradePaliToc extends Command
 		$bar = $this->output->createProgressBar($_to-$_from+1);
 		for ($from=$_from; $from <= $_to; $from++) {
 			// 打开csv文件并读取数据
-			$strFileName = config("app.path.pali_title") . "/{$from}_{$_lang}.csv";
+			$strFileName = config("mint.path.pali_title") . "/{$from}_{$_lang}.csv";
 			if(!file_exists($strFileName)){
 				continue;
 			}
@@ -81,7 +81,7 @@ class UpgradePaliToc extends Command
 								$author = "cscd4";
 							}
 							$data[6] = mb_substr($data[6],0,1024);
-							
+
 							$newData = [
 								'book'=>$from,
 								'paragraph'=>$data[2],
@@ -91,7 +91,7 @@ class UpgradePaliToc extends Command
 								'type'=>$type,
 								'language'=>$_lang,
 								'author'=>$author,
-								'share'=>1,				
+								'share'=>1,
 								'create_time'=>time()*1000,
 								'update_time'=>time()*1000,
 							];

+ 1 - 1
app/Console/Commands/UpgradeQuote.php

@@ -115,7 +115,7 @@ class UpgradeQuote extends Command
                         'uid' =>Str::uuid(),
                     ]
                     );
-                $newRow->editor_uid = config("app.admin.root_uuid");
+                $newRow->editor_uid = config("mint.admin.root_uuid");
                 $newRow->content = trim($sent);
                 $newRow->content_type = "json";
                 $newRow->strlen = mb_strlen($sent,"UTF-8");

+ 1 - 1
app/Console/Commands/UpgradeRelatedParagraph.php

@@ -48,7 +48,7 @@ class UpgradeRelatedParagraph extends Command
         #删除目标数据库中数据
         RelatedParagraph::where('book','>',0)->delete();
 		// 打开csv文件并读取数据
-        $strFileName = config("app.path.pali_title") . "/cs6_para.csv";
+        $strFileName = config("mint.path.pali_title") . "/cs6_para.csv";
         if(!file_exists($strFileName)){
             return 1;
         }

+ 1 - 1
app/Console/Commands/UpgradeWbwTemplate.php

@@ -107,7 +107,7 @@ class UpgradeWbwTemplate extends Command
 					'uid' =>Str::uuid(),
 				]
 				);
-            $newRow->editor_uid = config("app.admin.root_uuid");
+            $newRow->editor_uid = config("mint.admin.root_uuid");
             $newRow->content = trim($sent);
             $newRow->content_type = "json";
             $newRow->strlen = mb_strlen($sent,"UTF-8");

+ 1 - 1
app/Console/Commands/UpgradeWordPart.php

@@ -60,7 +60,7 @@ class UpgradeWordPart extends Command
         $bar->finish();
 
 		#载入csv数据
-		$csvFile = config("app.path.dict_text") .'/system/part2.csv';
+		$csvFile = config("mint.path.dict_text") .'/system/part2.csv';
 		if (($fp = fopen($csvFile, "r")) !== false) {
 			Log::info("csv load:" . $csvFile);
 			while (($data = fgetcsv($fp, 0, ',')) !== false) {

+ 3 - 3
app/Console/Commands/WebHookArticleNew.php

@@ -39,7 +39,7 @@ class WebHookArticleNew extends Command
     public function handle()
     {
 		# 获取最新文章数据
-		$url = config('app.url',"http://127.0.0.1:8000")."/api/v2/progress?view=chapter&channel_type=translation";
+		$url = config('app.url')."/api/v2/progress?view=chapter&channel_type=translation";
 
 		$response = Http::get($url);
 		if($response->successful()){
@@ -59,10 +59,10 @@ class WebHookArticleNew extends Command
 					$title = $row['toc'];
 				}
 
-				$link = config('app.url',"http://127.0.0.1:8000")."/app/article/index.php?view=chapter&book={$book}&par={$para}&channel={$channel_id}";
+				$link = config('app.url')."/app/article/index.php?view=chapter&book={$book}&par={$para}&channel={$channel_id}";
 				$message .= "1. [{$title}]({$link})\n";
 			}
-			$link = config('app.url',"http://127.0.0.1:8000")."/app/palicanon";
+			$link = config('app.url')."/app/palicanon";
 			$message .= "\n [更多]({$link})";
 			$this->info($message);
 			$url = $this->argument('host');

+ 3 - 3
app/Console/Kernel.php

@@ -18,12 +18,12 @@ class Kernel extends ConsoleKernel
     {
         $schedule->command('upgrade:daily')
                  ->dailyAt('00:00')
-                 ->emailOutputTo(config("app.email.ScheduleEmailOutputTo"))
-				 ->emailOutputOnFailure(config("app.email.ScheduleEmailOutputOnFailure"));
+                 ->emailOutputTo(config("mint.email.ScheduleEmailOutputTo"))
+				 ->emailOutputOnFailure(config("mint.email.ScheduleEmailOutputOnFailure"));
 
         $schedule->command('upgrade:weekly')
                  ->weekly()
-                 ->emailOutputOnFailure(config("app.email.ScheduleEmailOutputOnFailure"));
+                 ->emailOutputOnFailure(config("mint.email.ScheduleEmailOutputOnFailure"));
     }
 
     /**

+ 2 - 2
app/Http/Api/ChannelApi.php

@@ -52,12 +52,12 @@ class ChannelApi{
     }
     public static function getSysChannel($channel_name,$fallback=""){
         $channel = Channel::where('name',$channel_name)
-                    ->where('owner_uid',config("app.admin.root_uuid"))
+                    ->where('owner_uid',config("mint.admin.root_uuid"))
                     ->first();
         if(!$channel){
             if(!empty($fallback)){
                 $channel = Channel::where('name',$fallback)
-                                  ->where('owner_uid',config("app.admin.root_uuid"))
+                                  ->where('owner_uid',config("mint.admin.root_uuid"))
                                   ->first();
                 if(!$channel){
                     return false;

+ 1 - 1
app/Http/Api/DictApi.php

@@ -70,7 +70,7 @@ class DictApi{
     }
     public static function getSysDict($name){
         $dict_info=  DictInfo::where('name',$name)
-                    ->where('owner_id',config("app.admin.root_uuid"))
+                    ->where('owner_id',config("mint.admin.root_uuid"))
                     ->first();
         if(!$dict_info){
             return false;

+ 1 - 1
app/Http/Api/TemplateRender.php

@@ -403,7 +403,7 @@ class TemplateRender{
         $paraId = $this->get_param($this->param,"para",1);
         $channelId = $this->channel_id[0];
         $props = RedisClusters::remember("/quote/{$channelId}/{$paraId}",
-              config('cache.expire',3600*24),
+              config('mint.cache.expire'),
               function() use($paraId,$channelId){
                 $para = \explode('-',$paraId);
                 $output = [

+ 4 - 4
app/Http/Controllers/CorpusController.php

@@ -665,7 +665,7 @@ class CorpusController extends Controller
                             break;
                         case 'nissaya':
                             $newSent['html'] = RedisClusters::remember("/sent/{$channelId}/{$currSentId}",
-                                                config('cache.expire',3600*24),
+                                                config('mint.cache.expire'),
                                                 function() use($row,$mode){
                                                     return MdRender::render($row->content,[$row->channel_uid],null,$mode,"nissaya",$row->content_type);
                                                 });
@@ -677,7 +677,7 @@ class CorpusController extends Controller
                          */
                             if(strpos($row->content,'[[')===false){
                                 $newSent['html'] = RedisClusters::remember("/sent/{$channelId}/{$currSentId}",
-                                                    config('cache.expire',3600*24),
+                                                    config('mint.cache.expire'),
                                                 function() use($row){
                                                     return MdRender::render($row->content,[$row->channel_uid]);
                                                 });
@@ -914,7 +914,7 @@ class CorpusController extends Controller
         }else{
             $key .= 'guest';
         }
-		$channelCount = RedisClusters::remember($key,config('cache.expire',3600*24),
+		$channelCount = RedisClusters::remember($key,config('mint.cache.expire'),
                           function() use($book,$para,$start,$end,$userUuid){
                             $keyCanRead="/channel/can-read/";
                             if($userUuid){
@@ -923,7 +923,7 @@ class CorpusController extends Controller
                                 $keyCanRead .= 'guest';
                             }
                             $channelCanRead = RedisClusters::remember($keyCanRead,
-                                                config('cache.expire',3600*24),
+                                                config('mint.cache.expire'),
                                                 function() use($userUuid){
                                                     return ChannelApi::getCanReadByUser($userUuid);
                                                 });

+ 1 - 1
app/Http/Controllers/DhammaTermController.php

@@ -161,7 +161,7 @@ class DhammaTermController extends Controller
                     }
                     RedisClusters::put($key, $hotMeaning, 3600);
                     return $hotMeaning;
-                }, config('cache.expire',3600*24));
+                }, config('mint.cache.expire'));
                 return $this->ok(["rows"=>$value,"count"=>count($value)]);
                 break;
 			default:

+ 1 - 1
app/Http/Controllers/ProgressImgController.php

@@ -56,7 +56,7 @@ class ProgressImgController extends Controller
                     $svg .= '<polyline points="0,0 1,0" /></svg>';
                 }
                 return $svg;
-            } , config('cache.expire',3600*24) );
+            } , config('mint.cache.expire') );
             echo $svg;
         }, 200, ['Content-Type' => 'image/svg+xml']);
     /*

+ 1 - 1
app/Http/Controllers/RelationController.php

@@ -63,7 +63,7 @@ class RelationController extends Controller
 
         if($request->has('vocabulary')){
             if(!RedisClusters::has($key)){
-                RedisClusters::put($key,$output,config('cache.expire',3600*24));
+                RedisClusters::put($key,$output,config('mint.cache.expire'));
             }
         }
         return $this->ok($output);

+ 1 - 1
app/Http/Controllers/SentenceInfoController.php

@@ -130,7 +130,7 @@ class SentenceInfoController extends Controller
                 # code...
 				$key_sent_id = $sent->book_id.'-'.$sent->paragraph.'-'.$sent->word_start.'-'.$sent->word_end;
 				$para_strlen += RedisClusters::remember('pali-sent/strlen/'.$key_sent_id,
-                                    config('cache.expire',3600*24*30) ,
+                                    config('mint.cache.expire') ,
                                     function() use($sent) {
                                         return PaliSentence::where('book',$sent->book_id)
                                                 ->where('paragraph',$sent->paragraph)

+ 1 - 1
app/Http/Controllers/UserStatisticController.php

@@ -58,7 +58,7 @@ class UserStatisticController extends Controller
         //
         $queryUserId = UserApi::getIntIdByName($userName);
         $queryUserUuid = UserApi::getIdByName($userName);
-        $cacheExpiry = config('cache.expire',3600*24);
+        $cacheExpiry = config('mint.cache.expire');
         //总经验值
         $expSum = RedisClusters::remember("user/{$userName}/exp/sum",$cacheExpiry,function() use($queryUserId){
 			return UserOperationDaily::where('user_id',$queryUserId)

+ 1 - 1
app/Http/Controllers/VocabularyController.php

@@ -23,7 +23,7 @@ class VocabularyController extends Controller
             case 'key':
                 $key = $request->get("key");
                 $result = RedisClusters::remember("/dict_vocabulary/{$key}",
-                        config('cache.expire',3600*24),
+                        config('mint.cache.expire'),
                         function() use($key){
                         return Vocabulary::whereRaw('word like ? or word_en like ?',[$key."%",$key."%"])
                                     ->whereOr('word_en','like',$key."%")

+ 1 - 1
app/Http/Resources/SearchResource.php

@@ -35,7 +35,7 @@ class SearchResource extends JsonResource
         }else if(isset($this->content)){
             $data["content"] = $this->content;
         }else{
-            $channelId = RedisClusters::remember('_System_Pali_VRI_',config('cache.expire',3600*24),function(){
+            $channelId = RedisClusters::remember('_System_Pali_VRI_',config('mint.cache.expire'),function(){
                 return ChannelApi::getSysChannel('_System_Pali_VRI_');
             });
 

+ 2 - 2
app/Providers/AppServiceProvider.php

@@ -22,8 +22,8 @@ class AppServiceProvider extends ServiceProvider
         //雪花算法
 
 		$this->app->singleton('snowflake', function () {
-            return (new Snowflake(config('snowflake.data.center.id'),config('snowflake.worker.id')))
-                ->setStartTimeStamp(strtotime(config('database.snowflake.start'))*1000)
+            return (new Snowflake(config('mint.snowflake_data_center_id'),config('mint.snowflake.worker_id')))
+                ->setStartTimeStamp(strtotime(config('mint.snowflake.start'))*1000)
                 ->setSequenceResolver(
                     new LaravelSequenceResolver($this->app->get('cache')->store()
                 ));

+ 1 - 1
app/Tools/Export.php

@@ -17,7 +17,7 @@ class Export
             //Log::info($value['name']);
             //Log::info($value['content']);
         }
-        $host = config('lily.rpc.server');
+        $host = config('mint.server.rpc.lily');
         $client = new \Palm\Lily\V1\TexClient($host, [
             'credentials' => \Grpc\ChannelCredentials::createInsecure(),
         ]);

+ 1 - 1
app/Tools/Markdown.php

@@ -10,7 +10,7 @@ class Markdown
     }
 
     public static function morus($text){
-        $host = config('morus.rpc.server');
+        $host = config('mint.server.rpc.morus');
         $client = new \Mint\Morus\V1\MarkdownClient($host, [
             'credentials' => \Grpc\ChannelCredentials::createInsecure(),
         ]);

+ 4 - 4
app/Tools/TurboSplit.php

@@ -179,7 +179,7 @@ class TurboSplit
 
 		//获取单词权重
 		$row = Cache::remember('palicanon/wordpart/weight/'.$search,
-                config('cache.expire',3600*24) ,
+                config('mint.cache.expire') ,
                 function() use($search) {
                     return WordPart::where('word',$search)->value('weight');
                 });
@@ -208,7 +208,7 @@ class TurboSplit
 			$len = 0;
 			foreach ($newWord as $x => $x_value) {
 				$row = Cache::remember('palicanon/wordpart/weight/'.$search,
-                        config('cache.expire',3600*24) ,
+                        config('mint.cache.expire') ,
                         function() use($x) {
                             return WordPart::where('word',$x)->value('weight');
                         });
@@ -238,7 +238,7 @@ class TurboSplit
 		$isFound = false;
 		$count = 0;
 		$wordPart  = Cache::remember("turbosplit/part/{$word}",
-                        config('cache.expire',3600*24),
+                        config('mint.cache.expire'),
                         function() use($word){
                             return implode(',',$this->dict_lookup($word));
                         });
@@ -254,7 +254,7 @@ class TurboSplit
 		//fomular of confidence value 信心值计算公式
 		if ($isFound) {
 			$cf  = Cache::remember("turbosplit/confidence/".$word,
-                    config('cache.expire',1000),
+                    config('mint.cache.expire'),
                     function() use($word,$count,$case_len){
                         $len = mb_strlen($word, "UTF-8") - $case_len;
                         $len_correct = 1.2;

+ 0 - 36
config/app.php

@@ -232,41 +232,5 @@ return [
         'Image' => Intervention\Image\Facades\Image::class,
     ],
 
-    /*
-    |--------------------------------------------------------------------------
-    | 另外增添的路径
-    |--------------------------------------------------------------------------
-    |
-    |
-    */
-	'path' => [
-		'dependence' => storage_path('depandence'),
-		'palitext' => public_path('palihtml'),
-		'palitext_filelist' => public_path('palihtml').'/filelist.csv',
-		'palicsv' => public_path('tmp').'/palicsv',
-		'pali_title' => public_path('pali_title'),
-		'paliword' => public_path('paliword'),
-		'paliword_book' => public_path('paliword')."/book",
-		'paliword_index' => public_path('paliword')."/index",
-		'word_statistics' => public_path('dependence')."/word_statistics/data",
-		'dict_text' => public_path('dicttext'),
-	],
-
-	'admin' => [
-		'root_uuid' => '6e12f8ea-ee4d-4e0f-a6b0-472f2d99a814',
-		'robot_uuid' => '6e12f8ea-ee4d-4e0f-a6b0-472f2d99a814',
-		'cs_channel' => '1e4b926d-54d7-4932-b8a6-7cdc65abd992',
-	],
-
-	'dependence' => [
-		[
-			'url' => 'https://www.github.com/iapt-platform/wipali-globle',
-			'path' => 'wipali-globle',
-		],
-	],
 
-	'email' => [
-		'ScheduleEmailOutputTo' => env('SCHEDULE_EMAIL_OUTPUTTO', 'kosalla1987@126.com'),
-		'ScheduleEmailOutputOnFailure' => env('SCHEDULE_EMAIL_OUTPUTONFAILURE', 'kosalla1987@126.com'),
-	]
 ];