data_table.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package models
  2. import (
  3. "eta/eta_data_push/utils"
  4. )
  5. // 指标数据->基础数据表
  6. func GetBaseDataTableName(source int) (tableName string) {
  7. switch source {
  8. case utils.DATA_SOURCE_THS:
  9. tableName = "edb_data_ths"
  10. case utils.DATA_SOURCE_PB, utils.DATA_SOURCE_PB_FINANCE:
  11. tableName = "edb_data_pb"
  12. case utils.DATA_SOURCE_EIA_STEO:
  13. tableName = "base_from_eia_steo_data"
  14. default:
  15. tableName = ""
  16. }
  17. return
  18. }
  19. // 指标数据->基础指标表
  20. func GetBaseIndexTableName(source int) (tableName string) {
  21. switch source {
  22. case utils.DATA_SOURCE_THS:
  23. tableName = "edb_info"
  24. case utils.DATA_SOURCE_PB, utils.DATA_SOURCE_PB_FINANCE:
  25. tableName = "edb_info"
  26. case utils.DATA_SOURCE_ZZ:
  27. tableName = "base_from_trade_zhengzhou_index"
  28. case utils.DATA_SOURCE_DL:
  29. tableName = "base_from_trade_dalian_index"
  30. case utils.DATA_SOURCE_SH:
  31. tableName = "base_from_trade_shanghai_index"
  32. case utils.DATA_SOURCE_CFFEX:
  33. tableName = "base_from_trade_cffex_index"
  34. case utils.DATA_SOURCE_SHFE:
  35. tableName = "base_from_trade_ine_index"
  36. case utils.DATA_SOURCE_GOOGLE_TRAVEL:
  37. tableName = "base_from_changes_visitors_covid"
  38. case utils.DATA_SOURCE_EIA_STEO:
  39. tableName = "base_from_eia_steo_index"
  40. default:
  41. tableName = ""
  42. }
  43. return
  44. }