longyu %!s(int64=3) %!d(string=hai) anos
pai
achega
bb3d6419c8

+ 1 - 1
models/base_from_trade_cffex.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/base_from_trade_dalian.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/base_from_trade_eic.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/base_from_trade_ine.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/base_from_trade_shanghai.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/base_from_trade_zhengzhou.go

@@ -1,7 +1,7 @@
 package models
 
 import (
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 	"time"
 )
 

+ 1 - 1
models/db.go

@@ -6,7 +6,7 @@ import (
 
 	_ "github.com/go-sql-driver/mysql"
 
-	"rdluck_tools/orm"
+	"github.com/rdlucklib/rdluck_tools/orm"
 )
 
 func init() {

+ 1 - 1
services/commodity_trade_cffex.go

@@ -6,7 +6,7 @@ import (
 	"github.com/mozillazg/go-pinyin"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
-	"rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strings"
 	"time"
 )

+ 1 - 1
services/commodity_trade_ine.go

@@ -6,7 +6,7 @@ import (
 	"github.com/mozillazg/go-pinyin"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
-	"rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strings"
 	"time"
 )

+ 1 - 1
services/commodity_trade_shanghai.go

@@ -6,7 +6,7 @@ import (
 	"github.com/mozillazg/go-pinyin"
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
-	"rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strings"
 	"time"
 )

+ 1 - 1
services/commodity_trade_zhengzhou.go

@@ -6,7 +6,7 @@ import (
 	"hongze/hongze_data_crawler/models"
 	"hongze/hongze_data_crawler/utils"
 	"log"
-	"rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strconv"
 	"strings"
 	"time"

+ 1 - 1
services/sso_eic.go

@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"hongze/hongze_data_crawler/models"
-	"rdluck_tools/http"
+	"github.com/rdlucklib/rdluck_tools/http"
 	"strconv"
 	"time"
 )

+ 9 - 0
utils/config.go

@@ -1,6 +1,7 @@
 package utils
 
 import (
+	"fmt"
 	beeLogger "github.com/beego/bee/v2/logger"
 	"github.com/beego/beego/v2/server/web"
 )
@@ -18,6 +19,14 @@ func init() {
 		panic("配置文件读取run_mode错误 " + err.Error())
 	}
 	RunMode = tmpRunMode
+	if RunMode == "" {
+		RunMode = "release"
+		configPath := `/home/code/config/hongze_data_crawler/conf/app.conf`
+		err := web.LoadAppConfig("ini", configPath)
+		if err != nil {
+			fmt.Println("web.LoadAppConfig Err:" + err.Error())
+		}
+	}
 
 	config, err := web.AppConfig.GetSection(RunMode)
 	if err != nil {