瀏覽代碼

晨报底部菜单图标更换

xiexiaoyuan 2 年之前
父節點
當前提交
8289ad2e4a

+ 1 - 1
models/tables/rddp/report_chapter/query.go

@@ -32,7 +32,7 @@ func GetListByReportId(reportId int, classifyNameFirst string) (list []*ReportCh
 	}
 
 	err = global.MYSQL["rddp"].Model(ReportChapter{}).
-		Select("report_chapter_id, report_id, type_id, type_name, abstract, title, author, publish_time").
+		Select("report_chapter_id, report_id, type_id, type_name, abstract, title, author, publish_time, trend").
 		Where(where, reportId).
 		Order("sort asc, report_chapter_id asc").
 		Scan(&list).Error

+ 2 - 1
models/tables/report_chapter_type/report_chapter_type.go

@@ -21,7 +21,8 @@ type ReportChapterType struct {
 	PauseStartTime         time.Time      `gorm:"column:pause_start_time;type:datetime" json:"pause_start_time"`                          //暂停开始日期
 	PauseEndTime           time.Time      `gorm:"column:pause_end_time;type:datetime" json:"pause_end_time"`                              //暂停结束日期
 	IsSet                  int            `gorm:"column:is_set;type:tinyint(4);default:0" json:"is_set"`
-	YbIconUrl              string    `gorm:"column:yb_icon_url;type:varchar(255) json:"yb_icon_url"`                                     //研报小程序3.0图标//是否设置:0为设置,1已设置
+	YbIconUrl              string    `gorm:"column:yb_icon_url;type:varchar(255) json:"yb_icon_url"`                                     //研报小程序3.0图标
+	YbBottomIcon              string    `gorm:"column:yb_bottom_icon;type:varchar(255) json:"yb_bottom_icon"`                                     //研报小程序3.0底部菜单图标
 }
 
 func (r *ReportChapterType) TableName() string {

+ 2 - 1
services/report/report_chapter.go

@@ -123,6 +123,7 @@ func GetChapterListByReport(classifyNameFirst string, reportId int, validWeekTyp
 				temp.TypeId = item.TypeId
 				temp.TypeName = item.TypeName
 				temp.Title = item.Title
+				temp.Trend = item.Trend
 				temp.ReportId = item.ReportId
 				temp.Sort = typeItem.Sort
 				temp.PublishTime = item.PublishTime
@@ -298,7 +299,7 @@ func GetMenuChapter(reportId int, typeIds []int, classifyNameFirst string, repor
 					temp.ReportChapterId = item.ReportChapterId
 					temp.ReportId = item.ReportId
 					temp.ReportChapterTypeName = typeItem.ReportChapterTypeName
-					temp.ReportChapterTypeThumb = typeItem.YbIconUrl
+					temp.ReportChapterTypeThumb = typeItem.YbBottomIcon
 					temp.Sort = typeItem.Sort
 					reportTypeList = append(reportTypeList, temp)
 				}