1234567891011121314151617 |
- package data_manage
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- func GetEdbDataGlMaxOrMinDate(edbCode string) (min_date, max_date string, err error) {
- o := orm.NewOrmUsingDB("data")
- sql := ` SELECT MIN(data_time) AS min_date,MAX(data_time) AS max_date FROM edb_data_gl WHERE edb_code=? `
- err = o.Raw(sql, edbCode).QueryRow(&min_date, &max_date)
- return
- }
- type GlData struct {
- InputValue string `orm:"column(DATA_VALUE)" description:"日期"`
- DataTime string `orm:"column(DATA_DATE)" description:"值"`
- }
|