|
@@ -22,7 +22,7 @@ type BaseFromYongyiIndex struct {
|
|
|
}
|
|
|
|
|
|
type BaseFromYongyiIndexList struct {
|
|
|
- YongyiIndexId int `orm:"column(yongyi_index_id);pk"`
|
|
|
+ YongyiIndexId int `gorm:"column:yongyi_index_id;primaryKey"`
|
|
|
ClassifyId int
|
|
|
Interface string
|
|
|
EdbInfoId int
|
|
@@ -147,11 +147,16 @@ func GetYongyiDataDataTimeByIndexId(indexIdList []int) (items []string, err erro
|
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
|
sql := ` SELECT DISTINCT data_time FROM base_from_yongyi_data WHERE yongyi_index_id IN (` + utils.GetOrmInReplace(len(indexIdList)) + `) ORDER BY data_time DESC`
|
|
|
err = o.Raw(sql, indexIdList).Find(&items).Error
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
+ for i := range items {
|
|
|
+ items[i] = utils.GormDateStrToDateStr(items[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|
|
|
type BaseFromYongyiData struct {
|
|
|
- YongyiDataId int `orm:"column(yongyi_data_id);pk" gorm:"primaryKey"`
|
|
|
+ YongyiDataId int `gorm:"column:yongyi_data_id;primaryKey"`
|
|
|
YongyiIndexId int
|
|
|
IndexCode string
|
|
|
DataTime string
|
|
@@ -177,7 +182,7 @@ func (m *BaseFromYongyiData) AfterFind(tx *gorm.DB) (err error) {
|
|
|
}
|
|
|
|
|
|
type BaseFromYongyiIndexSearchItem struct {
|
|
|
- YongyiIndexId int `orm:"column(yongyi_index_id);pk" gorm:"primaryKey"`
|
|
|
+ YongyiIndexId int `gorm:"column:yongyi_index_id;primaryKey"`
|
|
|
ClassifyId int
|
|
|
ParentClassifyId int
|
|
|
IndexCode string
|