edb_data_manual.go 788 B

12345678910111213141516171819202122232425262728
  1. package data_manage
  2. import (
  3. "eta_gn/eta_api/global"
  4. "time"
  5. )
  6. func GetEdbDataManualMaxOrMinDate(edbCode string) (minDate, maxDate string, err error) {
  7. sql := ` SELECT MIN(data_time) AS min_date,MAX(data_time) AS max_date FROM edb_data_manual WHERE edb_code=? `
  8. var tmpDate SmmMaxOrMinDate
  9. err = global.DmSQL["data"].Raw(sql, edbCode).Scan(&tmpDate).Error
  10. if err != nil {
  11. return
  12. }
  13. minDate = tmpDate.MinDate
  14. maxDate = tmpDate.MaxDate
  15. return
  16. }
  17. type ManualEdbdata struct {
  18. TradeCode string `orm:"column(TRADE_CODE);pk" gorm:"primaryKey" description:"指标编码"`
  19. Dt string `orm:"column(DT)" description:"日期"`
  20. Close string `orm:"column(CLOSE)" description:"值"`
  21. ModifyTime time.Time `orm:"column(modify_time)" description:"修改时间"`
  22. }