Browse Source

研报内容为空

kobe6258 6 months ago
parent
commit
d723af23c6
2 changed files with 3 additions and 1 deletions
  1. 2 0
      domian/report/eta_report_service.go
  2. 1 1
      models/eta/eta_chapter.go

+ 2 - 0
domian/report/eta_report_service.go

@@ -33,6 +33,7 @@ type ETAReportDTO struct {
 }
 
 type ReportChapterDTO struct {
+	Title            string `json:"title"`
 	Content          string `json:"content"`
 	VideoURL         string `json:"videoURL"`
 	VideoName        string `json:"videoName"`
@@ -140,6 +141,7 @@ func convertToETAReportDTO(report eta.ETAReport) (dto ETAReportDTO) {
 func convertToReportChapterDTO(chapters []eta.ReportChapter) (dtoList []ReportChapterDTO) {
 	for _, chapter := range chapters {
 		dto := ReportChapterDTO{
+			Title:            chapter.Title,
 			Content:          html.UnescapeString(chapter.Content),
 			VideoURL:         chapter.VideoURL,
 			VideoName:        chapter.VideoName,

+ 1 - 1
models/eta/eta_chapter.go

@@ -3,7 +3,7 @@ package eta
 import "eta/eta_mini_ht_api/models"
 
 const (
-	columns = "content,video_url,video_name,video_play_seconds,video_size"
+	columns = "title,content,video_url,video_name,video_play_seconds,video_size"
 )
 
 // ReportChapter 表示报告章节的结构体