edb_data_sci_hq.go 370 B

12345678910
  1. package data_manage
  2. import "github.com/beego/beego/v2/client/orm"
  3. func GetEdbDataSciHqMaxAndMinDate(edbCode string) (min_date, max_date string, err error) {
  4. o := orm.NewOrmUsingDB("data")
  5. sql := ` SELECT MIN(data_time) AS min_date,MAX(data_time) AS max_date FROM edb_data_sci_hq WHERE edb_code=? `
  6. err = o.Raw(sql, edbCode).QueryRow(&min_date, &max_date)
  7. return
  8. }