edb_data_fubao.go 387 B

12345678910111213
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. )
  5. // 富宝数据
  6. func GetEdbDataFubaoMaxOrMinDate(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_ths WHERE edb_code=? `
  9. err = o.Raw(sql, edbCode).QueryRow(&min_date, &max_date)
  10. return
  11. }