Browse Source

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

xingzai 1 year ago
parent
commit
47f951d8fe
1 changed files with 9 additions and 5 deletions
  1. 9 5
      services/activity.go

+ 9 - 5
services/activity.go

@@ -496,10 +496,7 @@ func GetUserTypeZhengShi(companyId int) (userType int, permissionStrnew, permiss
 func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.ActivityDetail) (havePower, isResearchSpecial bool, err error) {
 	var companyDetailStatus string
 	var userTypeStr string
-	//如果是 公司调研电话会:3,或 专家线下沙龙:5  而且  除易董同步过来的以外的研选类型活动,必须要有研选的正式权限
-	if (activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 5) && activityInfo.YidongActivityId == "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
-		isResearchSpecial = true
-	}
+
 	//如果是弘则的用户或者宏观的权限不做校验
 	if GetBelongingRai(user.Mobile) || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
 		havePower = true
@@ -530,15 +527,22 @@ 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
 		}