1234567891011121314151617181920212223242526 |
- package services
- import (
- "eta/eta_data_push/models"
- "eta/eta_data_push/utils"
- )
- func GetClassifyList(source int) (list interface{}, err error) {
- switch source {
- case utils.DATA_SOURCE_GFEX:
- gzObj := new(models.BaseFromTradeGuangzhouClassify)
- list, err = gzObj.GetBaseFromTradeGuangzhouClassifyAll()
- case utils.DATA_SOURCE_ICPI:
- icpiObj := new(models.BaseFromIcpiClassify)
- list, err = icpiObj.GetBaseFromIcpiClassifyAll()
- case utils.DATA_SOURCE_EIA_STEO:
- eiaSteoObj := new(models.BaseFromEiaSteoClassify)
- list, err = eiaSteoObj.GetBaseFromEiaSteoClassifyAll()
- case utils.DATA_SOURCE_USDA_FAS:
- usdaFasObj := new(models.BaseFromUsdaFasClassify)
- list, err = usdaFasObj.GetBaseFromUsdaFasClassifyAll()
- default:
- }
- return
- }
|