classify.go 747 B

1234567891011121314151617181920212223242526
  1. package services
  2. import (
  3. "eta/eta_data_push/models"
  4. "eta/eta_data_push/utils"
  5. )
  6. func GetClassifyList(source int) (list interface{}, err error) {
  7. switch source {
  8. case utils.DATA_SOURCE_GFEX:
  9. gzObj := new(models.BaseFromTradeGuangzhouClassify)
  10. list, err = gzObj.GetBaseFromTradeGuangzhouClassifyAll()
  11. case utils.DATA_SOURCE_ICPI:
  12. icpiObj := new(models.BaseFromIcpiClassify)
  13. list, err = icpiObj.GetBaseFromIcpiClassifyAll()
  14. case utils.DATA_SOURCE_EIA_STEO:
  15. eiaSteoObj := new(models.BaseFromEiaSteoClassify)
  16. list, err = eiaSteoObj.GetBaseFromEiaSteoClassifyAll()
  17. case utils.DATA_SOURCE_USDA_FAS:
  18. usdaFasObj := new(models.BaseFromUsdaFasClassify)
  19. list, err = usdaFasObj.GetBaseFromUsdaFasClassifyAll()
  20. default:
  21. }
  22. return
  23. }