Browse Source

no message

xingzai 1 year ago
parent
commit
9ff0dff4b1
3 changed files with 14 additions and 20 deletions
  1. 1 18
      controllers/activity.go
  2. 8 0
      services/activity.go
  3. 5 2
      services/company_permission.go

+ 1 - 18
controllers/activity.go

@@ -354,7 +354,7 @@ func (this *ActivityCoAntroller) Detail() {
 
 	if havePower {
 		//是否展示限免标签
-		if services.GetShowSustainable() && strings.Contains(activityInfo.ChartPermissionName, "研选") {
+		if services.GetShowSustainable() && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 			activityInfo.IsShowSustainable = true
 		}
 		resp.HasPermission = 1
@@ -375,23 +375,6 @@ func (this *ActivityCoAntroller) Detail() {
 		if activityInfo.IsHideAppointment == 0 {
 			activityInfo.IsShowAppointment = services.IsShowAppointment(activityInfo.ActivityTypeId, activityInfo.ChartPermissionName)
 		}
-		//if activityInfo.ReportLink != "" {
-		//	artList := strings.Split(activityInfo.ReportLink, "{|}")
-		//	if len(artList) > 0 {
-		//		for _, v := range artList {
-		//			artitem := new(models.ActivityArticleResp)
-		//			artitem.ReportLink = v
-		//			artIdSlice := strings.Split(v, "/")
-		//			if len(artIdSlice) > 0 {
-		//				articleId, _ := strconv.Atoi(artIdSlice[len(artIdSlice)-1])
-		//				artitem.ArticleId = articleId
-		//			}
-		//			activityInfo.ArticleList = append(activityInfo.ArticleList, artitem)
-		//		}
-		//	}
-		//} else {
-		//	activityInfo.ArticleList = make([]*models.ActivityArticleResp, 0)
-		//}
 		activityInfo.ActivityTypeName = strings.Replace(activityInfo.ActivityTypeName, "(C类)", "", -1)
 
 		//处理活动关联的产业

+ 8 - 0
services/activity.go

@@ -532,6 +532,14 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 		err = errors.New("GetCompanyPermissionUpgrade, Err: " + e.Error())
 		return
 	}
+	//如果是 公司调研电话会:3,或 专家线下沙龙:5  而且  除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
+	if (activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 5) && activityInfo.YidongActivityId == "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		if !strings.Contains(permissionStrZhengShi, activityInfo.ChartPermissionName) {
+			havePower = false
+			return
+		}
+	}
+
 	if permissionStr == "" {
 		return
 	}

+ 5 - 2
services/company_permission.go

@@ -150,7 +150,8 @@ func GetUserHasPermissionActivity(user *models.WxUserItem, activityInfo *models.
 		return
 	}
 	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
-		popupMsg = "暂无<b>买方研选</b>权限<br/>您可申请开通试用"
+		//popupMsg = "暂无<b>买方研选</b>权限<br/>您可申请开通试用"
+		popupMsg = "签约买方研选套餐才可参与此活动,请联系对口销售"
 	} else {
 		popupMsg = "您暂无权限参加此活动,若想参加可以申请开通对应的试用权限"
 	}
@@ -182,7 +183,8 @@ func GetUserHasPermissionActivity(user *models.WxUserItem, activityInfo *models.
 			}
 			hasPermission = hasPermission
 			if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
-				popupMsg = "暂无<b>买方研选</b>权限<br/>您可申请开通试用"
+				//popupMsg = "暂无<b>买方研选</b>权限<br/>您可申请开通试用"
+				popupMsg = "签约买方研选套餐才可参与此活动,请联系对口销售"
 			} else {
 				popupMsg = "您暂无权限参加此活动,若想参加可以申请开通对应的试用权限"
 			}
@@ -203,6 +205,7 @@ func GetUserHasPermissionActivity(user *models.WxUserItem, activityInfo *models.
 		}
 		if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 			popupMsg = "暂无<b>买方研选</b>权限<br/>点击提交申请,提醒对口销售为你开通试用"
+			popupMsg = "签约买方研选套餐才可参与此活动,请联系对口销售"
 		} else {
 			if companyPermission == "专家" {
 				popupMsg = "您暂无权限参加【" + activityInfo.ActivityTypeName + "】类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile