ziwen 2 년 전
부모
커밋
11cf034a22
2개의 변경된 파일22개의 추가작업 그리고 14개의 파일을 삭제
  1. 7 0
      controllers/user.go
  2. 15 14
      models/article_comment.go

+ 7 - 0
controllers/user.go

@@ -889,7 +889,14 @@ func (this *UserController) CommnetList() {
 		if comment.ArticleId > 0 {
 			item.RedirectType = 1
 		} else if comment.IndustryId > 0 {
+			detail, err := models.GetIndustrialManagementDetail(comment.IndustryId)
+			if err != nil {
+				br.Msg = "获取信息失败"
+				br.ErrMsg = "获取信息失败,Err:" + err.Error()
+				return
+			}
 			item.RedirectType = 3
+			item.ChartPermissionId = detail.ChartPermissionId
 		} else if comment.ActivityId > 0 {
 			item.RedirectType = 2
 		}

+ 15 - 14
models/article_comment.go

@@ -65,22 +65,23 @@ func GetCommentListCount(userId int) (count int, err error) {
 }
 
 type CygxArticleCommentResp struct {
-	Id           int       `orm:"column(id);pk" description:"留言id"`
-	UserId       int       `description:"用户id"`
-	ArticleId    int       `description:"文章id"`
-	IndustryId   int       `description:"产业id"`
-	ActivityId   int       `description:"活动id"`
-	CreateTime   string `description:"创建时间"`
-	Mobile       string    `description:"手机号"`
-	Email        string    `description:"邮箱"`
-	CompanyId    int       `description:"公司id"`
-	CompanyName  string    `description:"公司名称"`
-	Content      string    `description:"内容"`
-	Title        string    `description:"标题"`
-	RedirectType int       `description:"跳转类型 1文章 2活动 3产业资源包"`
+	Id                int    `orm:"column(id);pk" description:"留言id"`
+	UserId            int    `description:"用户id"`
+	ArticleId         int    `description:"文章id"`
+	IndustryId        int    `description:"产业id"`
+	ActivityId        int    `description:"活动id"`
+	ChartPermissionId int    `description:"权限id"`
+	CreateTime        string `description:"创建时间"`
+	Mobile            string `description:"手机号"`
+	Email             string `description:"邮箱"`
+	CompanyId         int    `description:"公司id"`
+	CompanyName       string `description:"公司名称"`
+	Content           string `description:"内容"`
+	Title             string `description:"标题"`
+	RedirectType      int    `description:"跳转类型 1文章 2活动 3产业视频"`
 }
 
 type CygxCommentListResp struct {
-	List []*CygxArticleCommentResp
+	List   []*CygxArticleCommentResp
 	Paging *paging.PagingItem
 }