12345678910111213 |
- package data_manage
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- // GetEdbDataMysteelChemicalMaxOrMinDate 根据上海钢联指标code获取最大、最小日期
- func GetEdbDataMysteelChemicalMaxOrMinDate(edbCode string) (minDate, maxDate string, err error) {
- o := orm.NewOrmUsingDB("data")
- sql := ` SELECT MIN(data_time) AS minDate,MAX(data_time) AS maxDate FROM edb_data_mysteel_chemical WHERE edb_code=? `
- err = o.Raw(sql, edbCode).QueryRow(&minDate, &maxDate)
- return
- }
|