hongze 1 year ago
parent
commit
1e15bca1fb
4 changed files with 23 additions and 68 deletions
  1. 1 0
      .gitignore
  2. 0 48
      go.mod
  3. 19 19
      services/sync_hz_data.go
  4. 3 1
      services/task.go

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@ eta_task
 /README.en.md
 /README.md
 /eta_task.exe~
+/*.mod

+ 0 - 48
go.mod

@@ -1,48 +0,0 @@
-module eta/eta_task
-
-go 1.19
-
-require (
-	github.com/PuerkitoBio/goquery v1.8.1
-	github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible
-	github.com/beego/beego/v2 v2.0.2
-	github.com/dgrijalva/jwt-go v3.2.0+incompatible
-	github.com/go-sql-driver/mysql v1.6.0
-	github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
-	github.com/kgiannakakis/mp3duration v0.0.0-20191013070830-d834f8d5ed53
-	github.com/olivere/elastic/v7 v7.0.32
-	github.com/rdlucklib/rdluck_tools v1.0.3
-	github.com/shopspring/decimal v1.3.1
-	github.com/yidane/formula v0.0.0-20210902154546-0782e1736717
-	golang.org/x/net v0.14.0
-	gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
-)
-
-require (
-	github.com/andybalholm/cascadia v1.3.1 // indirect
-	github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20211218165449-dd623ecc2f02 // indirect
-	github.com/beorn7/perks v1.0.1 // indirect
-	github.com/cespare/xxhash/v2 v2.1.1 // indirect
-	github.com/garyburd/redigo v1.6.3 // indirect
-	github.com/golang/protobuf v1.5.2 // indirect
-	github.com/hashicorp/golang-lru v0.5.4 // indirect
-	github.com/josharian/intern v1.0.0 // indirect
-	github.com/mailru/easyjson v0.7.7 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
-	github.com/mitchellh/mapstructure v1.4.1 // indirect
-	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.11.0 // indirect
-	github.com/prometheus/client_model v0.2.0 // indirect
-	github.com/prometheus/common v0.26.0 // indirect
-	github.com/prometheus/procfs v0.6.0 // indirect
-	github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
-	github.com/stretchr/testify v1.8.0 // indirect
-	golang.org/x/crypto v0.12.0 // indirect
-	golang.org/x/sys v0.11.0 // indirect
-	golang.org/x/text v0.12.0 // indirect
-	golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
-	google.golang.org/protobuf v1.26.0 // indirect
-	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
-	gopkg.in/yaml.v2 v2.4.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
-)

+ 19 - 19
services/sync_hz_data.go

@@ -102,25 +102,25 @@ func SyncHzDataIndex(cont context.Context) (err error) {
 	}
 
 	//ICPI
-	{
-		//分类信息
-		err = SyncBaseFromIcpiClassify()
-		if err != nil {
-			fmt.Println("SyncBaseFromIcpiClassify Err:" + err.Error())
-			return
-		}
-		//指标信息
-		err = SyncBaseFromIcpi()
-		if err != nil {
-			fmt.Println("SyncBaseFromIcpi Err:" + err.Error())
-			return
-		}
-		err = SyncBaseFromIcpiData()
-		if err != nil {
-			fmt.Println("SyncBaseFromIcpiData Err:" + err.Error())
-			return
-		}
-	}
+	//{
+	//	//分类信息
+	//	err = SyncBaseFromIcpiClassify()
+	//	if err != nil {
+	//		fmt.Println("SyncBaseFromIcpiClassify Err:" + err.Error())
+	//		return
+	//	}
+	//	//指标信息
+	//	err = SyncBaseFromIcpi()
+	//	if err != nil {
+	//		fmt.Println("SyncBaseFromIcpi Err:" + err.Error())
+	//		return
+	//	}
+	//	err = SyncBaseFromIcpiData()
+	//	if err != nil {
+	//		fmt.Println("SyncBaseFromIcpiData Err:" + err.Error())
+	//		return
+	//	}
+	//}
 
 	// 同步指标数据
 	SyncHzDataIndexData()

+ 3 - 1
services/task.go

@@ -170,7 +170,9 @@ func SyncBaseData(cont context.Context) (err error) {
 		return nil
 	}
 	//同步钢联基础数据
-	go data.SyncGlDataBase()
+	if utils.BusinessCode == utils.BusinessCodeRelease {
+		go data.SyncGlDataBase()
+	}
 	return
 }