|
@@ -172,6 +172,16 @@ func (this *EdbInfoController) FenweiIndexData() {
|
|
|
edbCodeMap[v.EdbCode] = v
|
|
|
}
|
|
|
|
|
|
+ // 获取指标数据最新更新时间
|
|
|
+ lastModifyTimeList, err := data_manage.GetFenWeiDataLastModifyTimeList(indexCodes)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ lastModifyTimeMap := make(map[string]string)
|
|
|
+ for _, v := range lastModifyTimeList {
|
|
|
+ lastModifyTimeMap[v.IndexCode] = v.ModifyTime
|
|
|
+ }
|
|
|
+
|
|
|
resultList := make([]*data_manage.BaseFromFenweiIndexList, 0)
|
|
|
for _, v := range indexes {
|
|
|
product := new(data_manage.BaseFromFenweiIndexList)
|
|
@@ -182,15 +192,7 @@ func (this *EdbInfoController) FenweiIndexData() {
|
|
|
product.IndexName = v.IndexName
|
|
|
product.Frequency = v.Frequency
|
|
|
product.CreateTime = v.CreateTime
|
|
|
-
|
|
|
- // 获取指标数据最新更新时间
|
|
|
- modifyTime, err := data_manage.GetFenWeiDataLastModifyTime(v.IndexCode)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取数据失败"
|
|
|
- br.ErrMsg = "获取指标数据最新更新时间失败, Err:" + err.Error()
|
|
|
- return
|
|
|
- }
|
|
|
- product.ModifyTime = modifyTime
|
|
|
+ product.ModifyTime = lastModifyTimeMap[v.IndexCode]
|
|
|
|
|
|
edbInfo := edbCodeMap[v.IndexCode]
|
|
|
if edbInfo != nil {
|