123456789101112131415161718192021222324252627282930313233 |
- package data_manage
- import (
- "eta_gn/eta_api/global"
- "time"
- )
- type BaseDataMaxOrMinDate struct {
- MinDate string `json:"min_date"`
- MaxDate string `json:"max_date"`
- }
- func GetEdbDataManualMaxOrMinDate(edbCode string) (minDate, maxDate string, err error) {
- sql := ` SELECT MIN(data_time) AS min_date,MAX(data_time) AS max_date FROM edb_data_manual WHERE edb_code=? `
- var tmpDate BaseDataMaxOrMinDate
- err = global.DmSQL["data"].Raw(sql, edbCode).Scan(&tmpDate).Error
- if err != nil {
- return
- }
- minDate = tmpDate.MinDate
- maxDate = tmpDate.MaxDate
- return
- }
- type ManualEdbdata struct {
- TradeCode string `orm:"column(TRADE_CODE);pk" gorm:"primaryKey" description:"指标编码"`
- Dt string `orm:"column(DT)" description:"日期"`
- Close string `orm:"column(CLOSE)" description:"值"`
- ModifyTime time.Time `orm:"column(modify_time)" description:"修改时间"`
- }
|