zwxi vor 1 Jahr
Ursprung
Commit
baf00dfe50
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  1. 1 1
      services/mtjh_watch.go
  2. 7 1
      utils/config.go

+ 1 - 1
services/mtjh_watch.go

@@ -23,7 +23,7 @@ func mtjhWatch() {
 	if cacheClient == nil {
 		cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
 	}
-	err = filepath.Walk(utils.CoalMineFilePath, func(path string, info fs.FileInfo, err error) error {
+	err = filepath.Walk(utils.MtjhFilePath, func(path string, info fs.FileInfo, err error) error {
 		if err != nil {
 			return err
 		}

+ 7 - 1
utils/config.go

@@ -57,7 +57,7 @@ var (
 
 // 煤炭江湖
 var (
-	MtjhPath string //excel文件地址
+	MtjhFilePath string //excel文件地址
 	MtjhOpen string //是否配置煤炭江湖数据源,1已配置
 )
 
@@ -119,6 +119,12 @@ func init() {
 		FenweiOldFileDir = config["fenwei_old_file_dir"]
 	}
 
+	//煤炭江湖文件夹配置
+	{
+		MtjhFilePath = config["mtjh_file_path"]
+		MtjhOpen = config["mtjh_open"]
+	}
+
 	TerminalCode = config["terminal_code"]
 }