xingzai před 2 roky
rodič
revize
3f667e3914
2 změnil soubory, kde provedl 12 přidání a 1 odebrání
  1. 11 1
      controllers/report.go
  2. 1 0
      models/report.go

+ 11 - 1
controllers/report.go

@@ -2179,7 +2179,17 @@ func (this *ReportController) RoadshowDetail() {
 		} else {
 			hasFree = 1
 			var articlePermissionPermissionName string
-			articlePermissionPermissionName = detail.CategoryName
+			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
+			}
 			var hasPersion bool
 			slice := strings.Split(articlePermissionPermissionName, ",")
 			for _, v := range slice {

+ 1 - 0
models/report.go

@@ -299,6 +299,7 @@ type ReportDetailRoadshow struct {
 	ReportLink       string `orm:"column(link_article_id)"description:"报告链接"`
 	IsCollect        bool   `description:"是否收藏:true,已收藏,false:未收藏"`
 	IsRoadShow       bool   `description:"是否是路演精华"`
+	CategoryId       int    `description:"文章分类ID"`
 }
 
 type RoadshowDetailResp struct {