package models import ( "github.com/beego/beego/v2/client/orm" "time" ) type BaseFromTradeZhengzhouIndex struct { BaseFromTradeZhengzhouIndexId int `orm:"column(base_from_trade_zhengzhou_index_id);pk"` Rank int DealShortName string DealName string DealCode string DealValue int DealChange int BuyShortName string BuyName string BuyCode string BuyValue int BuyChange int SoldShortName string SoldName string SoldCode string SoldValue int SoldChange int Frequency string ClassifyName string ClassifyType string CreateTime time.Time ModifyTime time.Time DataTime string } func GetTradeZhengzhouIndex(startDate, endDate string) (list []*BaseFromTradeZhengzhouIndex, err error) { o := orm.NewOrm() sql := `SELECT * FROM base_from_trade_zhengzhou_index WHERE create_time>=? AND create_time<=? ` _, err = o.Raw(sql, startDate, endDate).QueryRows(&list) return }