Jelajahi Sumber

fix:配置,最新研报

zqbao 8 bulan lalu
induk
melakukan
2717e19ccb
2 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 4 1
      controllers/report.go
  2. 3 0
      utils/config.go

+ 4 - 1
controllers/report.go

@@ -422,7 +422,7 @@ func (this *ReportController) RecentList() {
 		br.ErrMsg = "研报列表查询失败,系统异常,Err:" + err.Error()
 		return
 	}
-	reportPdfList, err := models.GetReportPdfListByCondition("", []interface{}{}, 1, 3)
+	reportPdfList, err := models.GetReportPdfListByCondition("", []interface{}{}, 0, 3)
 	if err != nil {
 		br.Msg = "研报列表查询失败"
 		br.ErrMsg = "研报列表查询失败,系统异常,Err:" + err.Error()
@@ -440,11 +440,14 @@ func (this *ReportController) RecentList() {
 			ClassifyNameFirst:  v.ClassifyNameFirst,
 			ClassifyIdSecond:   v.ClassifyIdSecond,
 			ClassifyNameSecond: v.ClassifyNameSecond,
+			PdfUrl:             v.PdfUrl,
 			Title:              v.Title,
 			Abstract:           v.Abstract,
 			Stage:              v.Stage,
 			Author:             v.Author,
 			ReportType:         utils.ReportTypePdf,
+			PublishTime:        v.PublishTime.Format(utils.FormatDate),
+			ModifyTime:         v.ModifyTime,
 		})
 	}
 	sort.Sort(models.ByPublishTimeReportView(reportList.List))

+ 3 - 0
utils/config.go

@@ -105,6 +105,9 @@ func init() {
 	ETA_MINI_APP_SECRET = config["eta_mini_app_secret"]
 
 	MINI_CUSTOM_PERMISSION_NAME = config["mini_custom_permission_name"]
+	if MINI_CUSTOM_PERMISSION_NAME == "" {
+		MINI_CUSTOM_PERMISSION_NAME = "PDF报告"
+	}
 
 	initRedis(config)
 }