xingzai 2 tahun lalu
induk
melakukan
e917296f8d
2 mengubah file dengan 2 tambahan dan 19 penghapusan
  1. 1 11
      controllers/report.go
  2. 1 8
      controllers/user.go

+ 1 - 11
controllers/report.go

@@ -2179,17 +2179,7 @@ func (this *ReportController) RoadshowDetail() {
 		} else {
 			hasFree = 1
 			var articlePermissionPermissionName string
-			if detail.ArticleId < utils.SummaryArticleId {
-				reportMapDetail, err := models.GetdetailByCategoryIdPush(detail.CategoryId)
-				if err != nil {
-					br.Msg = "获取信息失败"
-					br.ErrMsg = "获取信息失败,Err:" + err.Error()
-					return
-				}
-				articlePermissionPermissionName = reportMapDetail.ChartPermissionName
-			} else {
-				articlePermissionPermissionName = detail.CategoryName
-			}
+			articlePermissionPermissionName = detail.CategoryName
 			var hasPersion bool
 			slice := strings.Split(articlePermissionPermissionName, ",")
 			for _, v := range slice {

+ 1 - 8
controllers/user.go

@@ -567,16 +567,9 @@ func (this *UserController) CollectList() {
 			list[i].Pv = mapArticleCollectNum[article.ArticleId].Pv
 			list[i].IsCollect = mapArticleCollectNum[article.ArticleId].IsCollect
 		}
-		if _, ok := lyjhTypeMap[item.CategoryId]; ok {
+		if _, ok := lyjhTypeMap[item.CategoryId]; ok && list[i].ArticleId >= utils.SummaryArticleId {
 			list[i].IsRoadShow = true
 		}
-		//list[i].TitleEn = article.TitleEn
-		//list[i].UpdateFrequency = article.UpdateFrequency
-		//list[i].CreateDate = article.CreateDate
-		//list[i].Body, _ = services.GetReportContentTextSub(article.Body)
-		//list[i].Abstract = article.Abstract
-		//list[i].CategoryName = article.CategoryName
-		//list[i].SubCategoryName = article.SubCategoryName
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp.List = list