Ver código fonte

fix:修复最新研报

zqbao 8 meses atrás
pai
commit
f13c8b3fec
2 arquivos alterados com 3 adições e 3 exclusões
  1. 1 1
      controllers/report.go
  2. 2 2
      models/report.go

+ 1 - 1
controllers/report.go

@@ -489,7 +489,7 @@ func (this *ReportController) RecentList() {
 			Stage:              v.Stage,
 			Author:             v.Author,
 			ReportType:         utils.ReportTypePdf,
-			PublishTime:        v.PublishTime.Format(utils.FormatDate),
+			PublishTime:        v.PublishTime.Format(utils.FormatDateTime),
 			ModifyTime:         v.ModifyTime,
 		})
 	}

+ 2 - 2
models/report.go

@@ -77,11 +77,11 @@ func (a ByPublishTimeReportView) Less(i, j int) bool {
 	if a[j].PublishTime == "" {
 		return false
 	}
-	aiTime, err := time.Parse(utils.FormatDate, a[i].PublishTime)
+	aiTime, err := time.Parse(utils.FormatDateTime, a[i].PublishTime)
 	if err != nil {
 		return true
 	}
-	ajTime, err := time.Parse(utils.FormatDate, a[j].PublishTime)
+	ajTime, err := time.Parse(utils.FormatDateTime, a[j].PublishTime)
 	if err != nil {
 		return false
 	}