classify.go 604 B

1234567891011121314151617181920212223
  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. default:
  18. }
  19. return
  20. }