package models import ( "hongze/hongze_edb_lib/utils" "time" ) //指标检索数据 type EdbDataItem struct { EdbCode string `description:"指标编码"` StartDate string `description:"起始日期"` EndDate string `description:"终止日期"` EdbName string `description:"指标名称"` Unit string `description:"单位"` Frequency string `description:"频率"` DataList []*EdbData } type EdbData struct { EdbDataId int `orm:"column(edb_data_id);pk"` EdbInfoId int EdbCode string DataTime string Value string Status int CreateTime time.Time ModifyTime time.Time DataTimestamp int64 } func GetAddSql(edbInfoId, edbCode, dataTime, timestampStr string, value string) (addSql string) { nowStr := time.Now().Format(utils.FormatDateTime) addSql += "(" addSql += edbInfoId + "," + "'" + edbCode + "'" + "," + "'" + dataTime + "'" + "," + value + "," + "'" + nowStr + "'" + "," + "'" + nowStr + "'" + "," + "1" addSql += "," + "'" + timestampStr + "'" addSql += ")," return } type AddEdbInfoReq struct { EdbCode string `description:"指标编码"` }