Ver Fonte

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

xingzai há 1 ano atrás
pai
commit
e19a0fe21c
1 ficheiros alterados com 20 adições e 21 exclusões
  1. 20 21
      services/activity.go

+ 20 - 21
services/activity.go

@@ -502,6 +502,26 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 		havePower = true
 		return
 	}
+	userType, permissionStr, permissionStrZhengShi, e := GetUserTypeZhengShi(user.CompanyId)
+	if e != nil {
+		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) {
+		isResearchSpecial = true
+	}
+	//如果是 公司调研电话会:3,或 专家线下沙龙:5  而且  除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
+	if isResearchSpecial {
+		if !strings.Contains(permissionStr, utils.CHART_PERMISSION_NAME_YANXUAN) {
+			//如果连试用权限都没有,那么久按照普通的研选样式展示
+			isResearchSpecial = false
+		}
+		if !strings.Contains(permissionStrZhengShi, activityInfo.ChartPermissionName) {
+			havePower = false
+			return
+		}
+	}
 	//处理决策人可见权限
 	if user.IsMaker == 0 && activityInfo.IsMakerShow == 1 {
 		havePower = false
@@ -527,27 +547,6 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 			return
 		}
 	}
-	userType, permissionStr, permissionStrZhengShi, e := GetUserTypeZhengShi(user.CompanyId)
-	if e != nil {
-		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) {
-		isResearchSpecial = true
-	}
-	//如果是 公司调研电话会:3,或 专家线下沙龙:5  而且  除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
-	if isResearchSpecial {
-		if !strings.Contains(permissionStrZhengShi, activityInfo.ChartPermissionName) {
-			//如果连试用权限都没有,那么久按照普通的研选样式展示
-			if strings.Contains(permissionStr, utils.CHART_PERMISSION_NAME_YANXUAN) {
-				isResearchSpecial = false
-			}
-			havePower = false
-			return
-		}
-	}
-
 	if permissionStr == "" {
 		return
 	}