|
@@ -252,12 +252,15 @@ func GetSciHqIndexInfoMaxAndMinInfo(indexCode string) (item *EdbInfoMaxAndMinInf
|
|
|
|
|
|
// 获取最新值
|
|
|
var latest_value float64
|
|
|
- sql = ` SELECT value AS latest_value FROM base_from_sci_hq_data WHERE index_code=? ORDER BY data_time DESC LIMIT 1 `
|
|
|
- err = o.Raw(sql, indexCode).QueryRow(&latest_value)
|
|
|
+ var latestDate string
|
|
|
+
|
|
|
+ sql = ` SELECT value AS latest_value, data_time AS latest_date FROM base_from_sci_hq_data WHERE index_code=? ORDER BY data_time DESC LIMIT 1 `
|
|
|
+ err = o.Raw(sql, indexCode).QueryRow(&latest_value, &latestDate)
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
item.LatestValue = latest_value
|
|
|
+ item.LatestDate = latestDate
|
|
|
|
|
|
return
|
|
|
}
|