|
@@ -562,7 +562,8 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
isResearchSpecial = true
|
|
|
}
|
|
|
//如果是弘则的用户或者宏观的权限不做校验
|
|
|
- if (GetBelongingRai(user.Mobile) && user.CompanyId == utils.HZ_COMPANY_ID) || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
|
|
|
+ //if (GetBelongingRai(user.Mobile) && user.CompanyId == utils.HZ_COMPANY_ID) || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
|
|
|
+ if GetBelongingRai(user.Mobile) && user.CompanyId == utils.HZ_COMPANY_ID {
|
|
|
havePower = true
|
|
|
return
|
|
|
}
|
|
@@ -572,6 +573,16 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
err = errors.New("GetCompanyPermissionUpgrade, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ //如果一个权限都没有就返回无权限
|
|
|
+ if permissionStr == "" {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ permissionStr += "," + utils.HONG_GUAN_NAME // 添加一个宏观权限
|
|
|
+ if permissionStrZhengShi == "" {
|
|
|
+ permissionStrZhengShi = utils.HONG_GUAN_NAME // 添加一个宏观权限
|
|
|
+ } else {
|
|
|
+ permissionStrZhengShi += "," + utils.HONG_GUAN_NAME // 添加一个宏观权限
|
|
|
+ }
|
|
|
|
|
|
//如果是易董的活动,主、副权限有一个满足即可
|
|
|
if activityInfo.YidongActivityId != "" {
|
|
@@ -708,10 +719,20 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
companyDetailStatus = companyDetail.Status
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //宏观满足用户可见身份验证权限既满足 2023-9-18
|
|
|
if activityInfo.ChartPermissionId == 1 {
|
|
|
- havePower = true
|
|
|
- return
|
|
|
+ if activityInfo.LimitPeopleNum > 0 {
|
|
|
+ if strings.Contains(activityInfo.CustomerTypeIds, userTypeStr) {
|
|
|
+ havePower = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ havePower = true
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3) && strings.Contains(permissionStr, "专家") && activityInfo.LimitPeopleNum == 0 {
|
|
|
havePower = true
|
|
|
} else if activityInfo.ActivityTypeId == 3 && strings.Contains(permissionStr, "专家") && companyDetailStatus == "正式" && strings.Contains(activityInfo.CustomerTypeIds, "4") {
|