浏览代码

专项产业调研详情按钮是否显示回显

xingzai 3 年之前
父节点
当前提交
25e37b8db5
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 9 0
      controllers/activity.go
  2. 1 0
      models/activity.go

+ 9 - 0
controllers/activity.go

@@ -3836,6 +3836,15 @@ func (this *ActivityCoAntroller) SpecialDetail() {
 		resp.PopupMsg = "您暂无权限参加此活动,若想参加可以申请开通对应的试用权限"
 	}
 	if hasPermission == 1 {
+		count, err := models.GetCygxUserFollowSpecial(user.UserId)
+		if err != nil {
+			br.Msg = "获取数据失败!"
+			br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
+			return
+		}
+		if count == 1 {
+			resp.Detail.IsFollow = true
+		}
 		activityInfo.ActivityTypeName = "专项调研"
 		resp.Detail = activityInfo
 	}

+ 1 - 0
models/activity.go

@@ -608,6 +608,7 @@ type CygxActivitySpecialDetail struct {
 	IndustrialSubjectName string `description:"标的名称(相关公司)"`
 	Scale                 string `description:"管理规模,空不填,1::50亿以下,2:50~100亿,3:100亿以上。多个用, 隔开"`
 	CustomerTypeIds       string `description:"活动可见的客户类型,多个ID用 , 隔开"`
+	IsFollow              bool   `description:"是否关注新调研通知"`
 }
 
 type GetCygxActivitySpecialDetailListResp struct {