|
@@ -36,7 +36,7 @@ type FutureGoodEdbDataListResp struct {
|
|
|
|
|
|
// FutureGoodEdbDataItem 期货指标数据列表数据
|
|
|
type FutureGoodEdbDataItem struct {
|
|
|
- FutureGoodEdbDataId int `orm:"column(future_good_edb_data_id);pk" gorm:"primaryKey" `
|
|
|
+ FutureGoodEdbDataId int `gorm:"column:future_good_edb_data_id;primaryKey" `
|
|
|
FutureGoodEdbInfoId int `description:"期货指标id"`
|
|
|
FutureGoodEdbCode string `description:"期货指标code"`
|
|
|
FutureGoodEdbName string `description:"期货指标名称"`
|
|
@@ -55,7 +55,7 @@ type FutureGoodEdbDataItem struct {
|
|
|
CreateTime string
|
|
|
}
|
|
|
|
|
|
-func (m *FutureGoodEdbDataItem) AfterFind(db *gorm.DB) (err error) {
|
|
|
+func (m *FutureGoodEdbDataItem) AfterFind(tx *gorm.DB) (err error) {
|
|
|
if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
if m.CreateTime != "" {
|
|
|
m.CreateTime = utils.GormDateStrToDateTimeStr(m.CreateTime)
|
|
@@ -90,8 +90,8 @@ func GetFutureGoodEdbDataList(condition string, pars []interface{}, startSize, p
|
|
|
sql += `ORDER BY data_time desc,modify_time DESC LIMIT ?,?`
|
|
|
pars = append(pars, startSize)
|
|
|
pars = append(pars, pageSize)
|
|
|
- err = global.DbMap[utils.DbNameIndex].Raw(sql, pars...).Scan(&list).Error
|
|
|
-
|
|
|
+ //err = global.DbMap[utils.DbNameIndex].Raw(sql, pars...).Scan(&list).Error
|
|
|
+ err = global.DbMap[utils.DbNameIndex].Raw(sql, pars...).Find(&list).Error
|
|
|
return
|
|
|
}
|
|
|
|