package data_manage import ( "eta/eta_task/global" "eta/eta_task/utils" "time" ) // EdbDataCalculateZjpj 直接拼接数据结构体 type EdbDataCalculateZjpj struct { EdbDataId int `orm:"column(edb_data_id);pk" gorm:"primaryKey"` EdbInfoId int EdbCode string DataTime string Value float64 Status int CreateTime time.Time ModifyTime time.Time DataTimestamp int64 } // GetAllEdbDataCalculateZjpjByEdbInfoId 根据指标id获取全部的数据 func GetAllEdbDataCalculateZjpjByEdbInfoId(edbInfoId int) (items []*EdbDataCalculateZjpj, err error) { o := global.DbMap[utils.DbNameIndex] sql := ` SELECT * FROM edb_data_calculate_zjpj WHERE edb_info_id=? ORDER BY data_time DESC ` err = o.Raw(sql, edbInfoId).Find(&items).Error return }