Browse Source

专栏列表头衔

hsun 2 years ago
parent
commit
983e688f6f

+ 1 - 0
models/response/classify.go

@@ -13,6 +13,7 @@ type ClassifyListItem struct {
 	HomeImgUrl         string `json:"home_img_url"`
 	Stage              int    `description:"期数" json:"stage"`
 	ProductName        string `json:"product_name"`
+	VipTitle		   string `json:"vip_title"`
 }
 
 type ClassifyDetail struct {

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

@@ -58,7 +58,7 @@ func GetByClassifyId(id int) (item *Classify, err error) {
 // GetListByPid 根据分类名称查找专栏列表
 func GetListByPid(pid int) (list []*Classify, err error) {
 	err = global.MYSQL["rddp"].Model(Classify{}).
-		Select("id, classify_name, parent_id, report_author, author_descript, home_img_url").
+		Select("id, classify_name, parent_id, report_author, author_descript, home_img_url, vip_title").
 		Where("parent_id = ? AND is_show = 1 ", pid).Order("sort asc, id asc").Scan(&list).Error
 	if err == utils.ErrNoRow {
 		err = nil

+ 1 - 0
services/report/classify.go

@@ -73,6 +73,7 @@ func GetClassListByClassifyId(user user.UserInfo, classifyIdFirst int) (list []*
 		temp.ReportAuthor = item.ReportAuthor
 		temp.HomeImgUrl = item.HomeImgUrl
 		temp.ClassifyNameSecond = item.ClassifyName
+		temp.VipTitle = item.VipTitle
 		if classifyInfo.ClassifyName == "权益研报" {
 			temp.ProductName = "权益"
 		} else {