|
@@ -471,12 +471,13 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
} else if (activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 4 || activityInfo.ActivityTypeId == 5) && strings.Contains(permissionStr, "专家") {
|
|
|
havePower = true
|
|
|
}
|
|
|
+
|
|
|
if activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 6 || activityInfo.ActivityTypeId == 7 {
|
|
|
- if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") {
|
|
|
+ if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") && strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) {
|
|
|
havePower = true
|
|
|
}
|
|
|
} else {
|
|
|
- if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(客观)") {
|
|
|
+ if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(客观)") && strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) {
|
|
|
havePower = true
|
|
|
}
|
|
|
}
|
|
@@ -495,14 +496,12 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
}
|
|
|
if strings.Contains(permissionShengji, activityInfo.ChartPermissionName) && strings.Contains(activityInfo.CustomerTypeIds, "8") {
|
|
|
havePower = true
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if strings.Contains(permissionStr, activityInfo.ChartPermissionName) && strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) {
|
|
|
- havePower = true
|
|
|
- return
|
|
|
}
|
|
|
-
|
|
|
+ fmt.Println("主客观2", havePower)
|
|
|
+ //if strings.Contains(permissionStr, activityInfo.ChartPermissionName) && strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) {
|
|
|
+ // havePower = true
|
|
|
+ //}
|
|
|
+ fmt.Println("主客观3", havePower)
|
|
|
if havePower && activityInfo.LimitPeopleNum > 0 {
|
|
|
//对于一些特殊的活动,即使权限满足也不给产看
|
|
|
noPower, e := GetShareNoPowe(activityInfo, permissionStr, userType, user)
|