base_from_trade_dalian.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package models
  2. import "github.com/beego/beego/v2/client/orm"
  3. type BaseFromTradeDalianIndex struct {
  4. BaseFromTradeDalianIndexId int `orm:"column(base_from_trade_dalian_index_id);pk"`
  5. Rank string `description:"排名"`
  6. DealShortName string `description:"成交量公司简称"`
  7. DealName string `description:"成交量指标名称"`
  8. DealCode string `description:"成交量指标编码"`
  9. DealValue string `description:"成交量"`
  10. DealChange string `description:"成交变化量"`
  11. BuyShortName string `description:"成交量公司简称"`
  12. BuyName string `description:"持买单量指标名称"`
  13. BuyCode string `description:"持买单量指标编码"`
  14. BuyValue string `description:"持买单量"`
  15. BuyChange string `description:"持买单量变化量"`
  16. SoldShortName string `description:"成交量公司简称"`
  17. SoldName string `description:"持买单量指标名称"`
  18. SoldCode string `description:"持买单量指标编码"`
  19. SoldValue string `description:"持买单量"`
  20. SoldChange string `description:"持买单量变化量"`
  21. Frequency string `description:"频度"`
  22. ClassifyName string `description:"分类名称"`
  23. ClassifyType string `description:"分类名称下的类型"`
  24. //CreateTime time.Time `description:"插入时间"`
  25. //ModifyTime time.Time `description:"修改时间"`
  26. //DataTime time.Time `description:"数据日期"`
  27. CreateTime string `description:"插入时间"`
  28. ModifyTime string `description:"修改时间"`
  29. DataTime string `description:"数据日期"`
  30. }
  31. func GetTradeDalianIndex(startDate, endDate string) (list []*BaseFromTradeDalianIndex, err error) {
  32. o := orm.NewOrm()
  33. sql := `SELECT * FROM base_from_trade_dalian_index WHERE create_time>=? AND create_time<=? `
  34. _, err = o.Raw(sql, startDate, endDate).QueryRows(&list)
  35. return
  36. }