Эх сурвалжийг харах

Merge branch 'cygx_10.5' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 жил өмнө
parent
commit
00937b6a99
1 өөрчлөгдсөн 21 нэмэгдсэн , 23 устгасан
  1. 21 23
      controllers/activity.go

+ 21 - 23
controllers/activity.go

@@ -863,8 +863,13 @@ func (this *ActivityCoAntroller) SignupAdd() {
 		resp.HasPermission = hasPermission
 		resp.SellerName = sellerName
 		resp.SellerMobile = sellerMobile
+	}
 
+	// 判断是否属于研选类型的活动
+	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		resp.IsResearch = true
 	}
+
 	//公司线下调研活动客户报名后给建会人,所属销售推送模板信息
 	if signupStatus == "Success" {
 		go services.SendResearchActivitiesTemplateMsg(user, activityInfo)
@@ -1169,29 +1174,6 @@ func (this *ActivityCoAntroller) MeetingReminderAdd() {
 	item := new(models.CygxActivityMeetingReminder)
 	resp := new(models.SignupStatus)
 	hasPermission := 0
-	companyDetail, err := models.GetCompanyDetailById(user.CompanyId)
-	if err != nil {
-		br.Msg = "获取信息失败!"
-		br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
-		return
-	}
-	if companyDetail == nil {
-		br.Msg = "获取信息失败!"
-		br.ErrMsg = "客户不存在,uid:" + strconv.Itoa(user.UserId) + "CompanyId:" + strconv.Itoa(user.CompanyId)
-		return
-	}
-	var userType int
-	userType, _, err = services.GetUserType(user.CompanyId)
-	if err != nil {
-		br.Msg = "获取信息失败!"
-		br.ErrMsg = "获取失败,Err:" + err.Error()
-		return
-	}
-	if userType == 1 && strings.Contains(activityInfo.ChartPermissionName, "研选") {
-		br.Msg = "您暂无查看该活动权限"
-		br.ErrMsg = "被分享客户不可见,永续客户无法查看研选行业"
-		return
-	}
 	resultTime := utils.StrTimeToTime(activityInfo.ActivityTime) //时间字符串格式转时间格式
 	if time.Now().After(resultTime.Add(-time.Minute * 15)) {
 		br.Msg = "活动开始前15分钟无法设置会议提醒"
@@ -1252,6 +1234,12 @@ func (this *ActivityCoAntroller) MeetingReminderAdd() {
 		resp.SellerName = sellerName
 		resp.SellerMobile = sellerMobile
 	}
+
+	// 判断是否属于研选类型的活动
+	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		resp.IsResearch = true
+	}
+
 	resp.SignupStatus = signupStatus
 	resp.ActivityId = activityId
 	var total int
@@ -2136,6 +2124,11 @@ func (this *ActivityCoAntroller) CheckAsk() {
 		resp.SellerName = sellerName
 		resp.SellerMobile = sellerMobile
 	}
+	// 判断是否属于研选类型的活动
+	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		resp.IsResearch = true
+	}
+
 	resp.ActivityId = activityId
 	br.Ret = 200
 	br.Success = true
@@ -3362,6 +3355,11 @@ func (this *ActivityCoAntroller) ActivityAppointmentAdd() {
 		resp.SellerMobile = sellerMobile
 	}
 
+	// 判断是否属于研选类型的活动
+	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		resp.IsResearch = true
+	}
+
 	resp.ActivityId = activityId
 	var total int
 	total, err = models.GetUserCygxActivityAppointmentCountByUid(user.UserId)