|
@@ -41,16 +41,16 @@ type BaseFromRzdIndexPage struct {
|
|
|
}
|
|
|
|
|
|
type BaseFromRzdIndexList struct {
|
|
|
- BaseFromRzdIndexId int `orm:"column(base_from_rzd_index_id);pk" gorm:"primaryKey"`
|
|
|
- CreateTime string `orm:"column(create_time)"`
|
|
|
- ModifyTime string `orm:"column(modify_time)"`
|
|
|
- BaseFromRzdClassifyId int `orm:"column(base_from_rzd_classify_id)"`
|
|
|
- IndexCode string `orm:"column(index_code)"`
|
|
|
- IndexName string `orm:"column(index_name)"`
|
|
|
- Frequency string `orm:"column(frequency)"`
|
|
|
- Unit string `orm:"column(unit)"`
|
|
|
- DataList []*BaseFromRzdData
|
|
|
- Paging *paging.PagingItem `description:"分页数据"`
|
|
|
+ BaseFromRzdIndexId int `gorm:"column:base_from_rzd_index_id;primaryKey"`
|
|
|
+ CreateTime string `orm:"column(create_time)"`
|
|
|
+ ModifyTime string `orm:"column(modify_time)"`
|
|
|
+ BaseFromRzdClassifyId int `orm:"column(base_from_rzd_classify_id)"`
|
|
|
+ IndexCode string `orm:"column(index_code)"`
|
|
|
+ IndexName string `orm:"column(index_name)"`
|
|
|
+ Frequency string `orm:"column(frequency)"`
|
|
|
+ Unit string `orm:"column(unit)"`
|
|
|
+ DataList []*BaseFromRzdData `gorm:"-"`
|
|
|
+ Paging *paging.PagingItem `description:"分页数据" gorm:"-"`
|
|
|
EdbInfoId int `description:"指标库主键id"`
|
|
|
}
|
|
|
|
|
@@ -98,14 +98,14 @@ func GetRzdIndexByClassifyIds(classifyIds []int) (items []*BaseFromRzdIndex, err
|
|
|
return items, nil
|
|
|
}
|
|
|
|
|
|
-func GetRzdIndex(condition string, pars interface{}) (items []*BaseFromRzdIndexList, err error) {
|
|
|
+func GetRzdIndex(condition string, pars []interface{}) (items []*BaseFromRzdIndexList, err error) {
|
|
|
o := global.DbMap[utils.DbNameIndex]
|
|
|
sql := ` SELECT * FROM base_from_rzd_index WHERE 1=1 `
|
|
|
if condition != "" {
|
|
|
sql += condition
|
|
|
}
|
|
|
sql += ` ORDER BY base_from_rzd_index_id asc`
|
|
|
- err = o.Raw(sql, pars).Find(&items).Error
|
|
|
+ err = o.Raw(sql, pars...).Find(&items).Error
|
|
|
return
|
|
|
}
|
|
|
|