ziwen 1 год назад
Родитель
Сommit
3be07365da
2 измененных файлов с 25 добавлено и 2 удалено
  1. 24 1
      controllers/report.go
  2. 1 1
      models/user.go

+ 24 - 1
controllers/report.go

@@ -978,8 +978,31 @@ func (this *MobileReportController) SearchReport() {
 				ButtonStyle:     styleMap[v.ArticleTypeId],
 				List:            v.List,
 			}
-			if v.ArticleTypeId == - 1{
+			if v.IsSpecial == 1 {
+				//去除图片标签
+				item.Annotation = utils.ArticleRemoveImgUrl(item.Annotation)
+
+				item.IsSpecial = true
 				item.ImgUrlPc = utils.CYGX_YANXUAN_SPECIAL_IMG_PC
+				if v.CompanyTags != "" {
+					item.CompanyTags = strings.Split(v.CompanyTags, ",")
+				} else {
+					item.CompanyTags = []string{}
+				}
+				if v.IndustryTags != "" {
+					item.IndustryTags = strings.Split(v.IndustryTags, ",")
+				} else {
+					item.IndustryTags = []string{}
+				}
+				item.ArticleTypeName = utils.CYGX_YANXUAN_SPECIAL
+				if v.SpecialType == 1 {
+					item.Title = "【笔记】" + item.Title
+				} else if v.SpecialType == 2 {
+					item.Title = "【观点】" + item.Title
+				}
+				if v.MyCollectNum > 0 {
+					item.IsCollect = true
+				}
 			}
 			if articleType == 1 {
 				resp.ListHz = append(resp.ListHz, &item)

+ 1 - 1
models/user.go

@@ -409,7 +409,7 @@ func GetArticleUserCollectList(startSize, pageSize, userId int) (items []*Articl
 		1 AS is_special_int,
 		a.tags AS special_tags,
 		( SELECT count( 1 ) FROM cygx_yanxuan_special_record AS h WHERE h.yanxuan_special_id = a.id ) AS pv,
-		( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac  INNER JOIN wx_user as u ON  u.user_id = ac.user_id  WHERE ac.yanxuan_special_id = a.id  ) AS collect_num,
+		( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac WHERE ac.yanxuan_special_id = a.id  ) AS collect_num,
 		( SELECT count( 1 ) FROM cygx_yanxuan_special_collect AS ac WHERE ac.yanxuan_special_id = a.id  AND user_id = ? ) AS my_collect_num,
 		a.type AS special_type,
 		a.user_id AS user_id,