浏览代码

Merge branch 'cygx_9.7' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 年之前
父节点
当前提交
893e3fde8f
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. 11 1
      controllers/report.go
  2. 1 0
      models/report_mapping.go

+ 11 - 1
controllers/report.go

@@ -258,6 +258,7 @@ func (this *ReportController) IndustryList() {
 // @Description 产业下所关联的文章分类列表接口
 // @Param   IndustrialManagementId   query   int  true       "产业ID"
 // @Param   ShowTimeLine   query   int  true       "是否展示时间线 0不展示,1展示"
+// @Param   IsSendWx   query   int  false       "是否是通过微信模版进来的 1是,其它否"
 // @Success 200 {object} models.IndustrialToArticleCategoryListRep
 // @router /toArticleCategoryList [get]
 func (this *ReportController) ArticleCategoryList() {
@@ -279,6 +280,7 @@ func (this *ReportController) ArticleCategoryList() {
 		return
 	}
 	showTimeLine, _ := this.GetInt("ShowTimeLine", 0)
+	isSendWx, _ := this.GetInt("IsSendWx")
 
 	detail, err := models.GetIndustrialManagementDetail(industrialManagementId)
 	if err != nil {
@@ -433,7 +435,15 @@ func (this *ReportController) ArticleCategoryList() {
 	if videoSimple.Id > 0 {
 		resp.IndustryVideo = videoSimple
 	}
-
+	if isSendWx == 1 {
+		industryUserFollowMap, err := services.GetIndustryUserFollowMap(user)
+		if err != nil {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "GetActivitySignupResp,Err:" + err.Error()
+			return
+		}
+		resp.IsFollowButton = industryUserFollowMap[industrialManagementId]
+	}
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"

+ 1 - 0
models/report_mapping.go

@@ -106,6 +106,7 @@ type IndustrialToArticleCategoryListRep struct {
 	LayoutTime             string `description:"布局时间"`
 	IndustryName           string `description:"产业名称"`
 	IndustrialManagementId int    `description:"产业D"`
+	IsFollowButton         bool   `description:"是否关注"`
 	IndustryVideo          *MicroVideoSimpleInfo
 	List                   []*IndustrialToArticleCategoryRep
 }