edb_data_manual.go 694 B

1234567891011121314151617181920
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. func GetEdbDataManualMaxOrMinDate(edbCode string) (min_date, max_date string, err error) {
  7. o := orm.NewOrmUsingDB("data")
  8. sql := ` SELECT MIN(data_time) AS min_date,MAX(data_time) AS max_date FROM edb_data_manual WHERE edb_code=? `
  9. err = o.Raw(sql, edbCode).QueryRow(&min_date, &max_date)
  10. return
  11. }
  12. type ManualEdbdata struct {
  13. TradeCode string `orm:"column(TRADE_CODE);pk" description:"指标编码"`
  14. Dt string `orm:"column(DT)" description:"日期"`
  15. Close string `orm:"column(CLOSE)" description:"值"`
  16. ModifyTime time.Time `orm:"column(modify_time)" description:"修改时间"`
  17. }