浏览代码

Merge branch 'aj_google_travel' of hongze/hongze_chart_lib into master

hongze 2 年之前
父节点
当前提交
2fcea1bd3e
共有 4 个文件被更改,包括 7 次插入0 次删除
  1. 2 0
      models/data_manage/edb_data_base.go
  2. 2 0
      models/edb_data_base.go
  3. 2 0
      services/data/base_edb_lib.go
  4. 1 0
      utils/constants.go

+ 2 - 0
models/data_manage/edb_data_base.go

@@ -61,6 +61,8 @@ func GetEdbDataTableName(source int) (tableName string) {
 		tableName = "edb_data_coal"
 	case utils.DATA_SOURCE_PYTHON:
 		tableName = "edb_data_python"
+	case utils.DATA_SOURCE_GOOGLE_TRAVEL:
+		tableName = "edb_data_google_travel"
 	default:
 		tableName = ""
 	}

+ 2 - 0
models/edb_data_base.go

@@ -60,6 +60,8 @@ func GetEdbDataTableName(source int) (tableName string) {
 		tableName = "edb_data_coal"
 	case utils.DATA_SOURCE_PYTHON:
 		tableName = "edb_data_python"
+	case utils.DATA_SOURCE_GOOGLE_TRAVEL:
+		tableName = "edb_data_google_travel"
 	default:
 		tableName = ""
 	}

+ 2 - 0
services/data/base_edb_lib.go

@@ -98,6 +98,8 @@ func RefreshEdbData(edbInfoId, source int, edbCode, startDate string) (resp *mod
 		urlStr = "/lt/refresh"
 	case utils.DATA_SOURCE_COAL:
 		urlStr = "/coal/refresh"
+	case utils.DATA_SOURCE_GOOGLE_TRAVEL:
+		urlStr = "google_travel/refresh"
 	}
 	if urlStr == "" {
 		err = fmt.Errorf(fmt.Sprint("source:", source, ";未实现该指标的刷新接口,请联系管理员"))

+ 1 - 0
utils/constants.go

@@ -60,6 +60,7 @@ const (
 	DATA_SOURCE_COAL                            //煤炭网->26
 	DATA_SOURCE_PYTHON                          //python代码->27
 	DATA_SOURCE_PB_FINANCE                      //彭博财务数据->28
+	DATA_SOURCE_GOOGLE_TRAVEL                   //谷歌出行->29
 )
 
 //数据刷新频率