Browse Source

fix: 收藏列表标题

hsun 2 năm trước cách đây
mục cha
commit
ea260c218e
2 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 1 0
      models/response/collection.go
  2. 4 0
      services/collection/collection.go

+ 1 - 0
models/response/collection.go

@@ -12,6 +12,7 @@ type CollectionList struct {
 	CollectionType int    `description:"收藏类型: 1-研报; 2-视频社区; 3-微路演视频"`
 	PrimaryId      int    `description:"不同收藏类型的ID"`
 	ExtendId       int    `description:"扩展ID: 如晨周报章节的ID, 大于0则详情页跳转章节详情"`
+	Title          string `description:"标题"`
 	PublishTime    string `description:"发布时间"`
 	CreateTime     string `description:"收藏时间"`
 	ClassifyName   string `description:"报告类型名称"`

+ 4 - 0
services/collection/collection.go

@@ -332,6 +332,7 @@ func GetCollectionList(userId, fromType, currPage, pageSize int, keywords string
 					v.PublishTime = cp.PublishTime.Format(utils.FormatDate)
 					v.ClassifyName = utils.REPORT_CHAPTER_TYPE_NAME_MAP[cp.ReportType]
 					v.Author = cp.Author
+					v.Title = cp.Title
 				}
 				break
 			}
@@ -340,12 +341,14 @@ func GetCollectionList(userId, fromType, currPage, pageSize int, keywords string
 				v.PublishTime = rp.PublishTime.Format(utils.FormatDate)
 				v.ClassifyName = rp.ClassifyNameFirst
 				v.Author = rp.Author
+				v.Title = rp.Title
 			}
 		case CollectionTypeVideo:
 			vd := videoMap[collections[i].PrimaryID]
 			if vd != nil {
 				v.PublishTime = vd.PublishTime.Format(utils.FormatDate)
 				v.ImgUrl = vd.CoverImgURL
+				v.Title = vd.Title
 			}
 		case CollectionTypeRoadVideo:
 			rv := roadVideoMap[collections[i].PrimaryID]
@@ -353,6 +356,7 @@ func GetCollectionList(userId, fromType, currPage, pageSize int, keywords string
 				v.PublishTime = rv.PublishTime.Format(utils.FormatDate)
 				v.ImgUrl = rv.CoverImgURL
 				v.Author = rv.AdminRealName
+				v.Title = rv.Title
 			}
 		default:
 			break