xyxie 1 mese fa
parent
commit
f7dd4f7c47
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      models/data_manage/base_from_ly_data.go

+ 3 - 2
models/data_manage/base_from_ly_data.go

@@ -5,9 +5,10 @@ package data_manage
 import (
 	"eta/eta_api/global"
 	"eta/eta_api/utils"
+	"strings"
+
 	"github.com/beego/beego/v2/client/orm"
 	"github.com/rdlucklib/rdluck_tools/paging"
-	"strings"
 )
 
 type BaseFromLyData struct {
@@ -54,7 +55,7 @@ func GetBaseFromLyDataByIndexCode(indexCode string) (items []*BaseFromLyData, er
 }
 
 func GetLyDataListByIndexCodes(IndexCodes string) (items []string, err error) {
-	sql := ` SELECT data_time FROM base_from_ly_data WHERE index_code IN(` + IndexCodes + `)  GROUP BY data_time DESC `
+	sql := ` SELECT data_time FROM base_from_ly_data WHERE index_code IN(` + IndexCodes + `)  ORDER BY data_time DESC `
 	o := global.DbMap[utils.DbNameIndex]
 	err = o.Raw(sql).Find(&items).Error
 	return