浏览代码

Merge branch 'master' of http://8.136.199.33:3000/cxzhang/hongze_clpt into debug

xingzai 1 年之前
父节点
当前提交
a2bfb4fd3e
共有 1 个文件被更改,包括 18 次插入17 次删除
  1. 18 17
      services/activity.go

+ 18 - 17
services/activity.go

@@ -884,6 +884,24 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 	//如果是易董的活动且属于研选类型,只要开通任何权限就可以查看详情
 	if activityInfo.YidongActivityId != "" && permissionStr != "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 		havePower = true
+		return
+	}
+	if activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 6 || activityInfo.ActivityTypeId == 7 {
+		if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") {
+			havePower = true
+		} else {
+			havePower = false
+		}
+	} else {
+		if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(客观)") {
+			havePower = true
+		} else {
+			havePower = false
+		}
+	}
+	//如果主客观校验不通过,那么直接返回
+	if !havePower {
+		return
 	}
 	if activityInfo.LimitPeopleNum > 0 {
 		mapUserType, e := GetActivityCcustomerTypeList()
@@ -965,23 +983,6 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 			}
 		}
 	}
-	if activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 6 || activityInfo.ActivityTypeId == 7 {
-		if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") {
-			havePower = true
-		} else {
-			havePower = false
-		}
-	} else {
-		if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(客观)") {
-			havePower = true
-		} else {
-			havePower = false
-		}
-	}
-	//如果主客观校验不通过,那么直接返回
-	if !havePower {
-		return
-	}
 
 	permissionShengji, errs := models.GetCompanyPermissionByUserTrip(user.CompanyId)
 	if errs != nil {