浏览代码

fix:调整eiaSteo的分类顺序

zqbao 7 月之前
父节点
当前提交
21e2bc57e6
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. 12 2
      services/eia_steo.go

+ 12 - 2
services/eia_steo.go

@@ -26,9 +26,19 @@ func SyncEiaSteoData(cont context.Context) (err error) {
 		"Drilling Productivity Metrics":                                                `https://www.eia.gov/outlooks/steo/data/browser/data/index.php?v=32&f=M&s=0&start=201901&end=202512&ctype=linechart&maptype=0&method=getData`,
 		"Crude Oil and Natural Gas Production from Shale and Tight Formations":         `https://www.eia.gov/outlooks/steo/data/browser/data/index.php?v=33&f=M&s=0&start=201901&end=202512&maptype=0&ctype=linechart&method=getData`,
 	}
+	var eiaIndexName = []string{"International Petroleum and Other Liquids Production、Consumption、Inventories",
+		"Non-OPEC Petroleum and Other Liquids Production",
+		"Total Liquid Fuels Production",
+		"Total Crude Oil Production",
+		"World Petroleum and Other Liquid Fuels Consumption",
+		"U.S. Petroleum and Other Liquids Supply、Consumption、Inventories",
+		"Drilling Productivity Metrics",
+		"Crude Oil and Natural Gas Production from Shale and Tight Formations",
+	}
 
-	for k, v := range eiaSteoUrls {
-		err = syncEiaSteoDataV2(k, v)
+	for _, name := range eiaIndexName {
+		url := eiaSteoUrls[name]
+		err = syncEiaSteoDataV2(name, url)
 		if err != nil {
 			fmt.Println("同步失败", err)
 			return