Browse Source

专项产业调研通知按钮的展示字段

xingzai 2 years ago
parent
commit
4923c3e875
2 changed files with 12 additions and 2 deletions
  1. 9 0
      controllers/activity.go
  2. 3 2
      models/activity.go

+ 9 - 0
controllers/activity.go

@@ -3578,6 +3578,15 @@ func (this *ActivityCoAntroller) SpecialList() {
 	}
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	resp := new(models.GetCygxActivitySpecialDetailListResp)
+	count, err := models.GetCygxUserFollowSpecial(user.UserId)
+	if err != nil {
+		br.Msg = "获取数据失败!"
+		br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
+		return
+	}
+	if count == 1 {
+		resp.IsFollow = true
+	}
 	resp.List = list
 	resp.Paging = page
 	br.Ret = 200

+ 3 - 2
models/activity.go

@@ -597,8 +597,9 @@ type CygxActivitySpecialDetail struct {
 }
 
 type GetCygxActivitySpecialDetailListResp struct {
-	Paging *paging.PagingItem `description:"分页数据"`
-	List   []*CygxActivitySpecialDetail
+	IsFollow bool               `description:"是否关注新调研通知"`
+	Paging   *paging.PagingItem `description:"分页数据"`
+	List     []*CygxActivitySpecialDetail
 }
 
 type CygxActivitySpecialResp struct {