Browse Source

Merge branch 'cygx_9.8' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 years ago
parent
commit
0bc35f73e9
2 changed files with 9 additions and 7 deletions
  1. 2 2
      controllers/activity.go
  2. 7 5
      services/activity.go

+ 2 - 2
controllers/activity.go

@@ -851,10 +851,10 @@ func (this *ActivityCoAntroller) SignupAdd() {
 			//1:预约外呼 、2:设置会议提醒 、 3:预约纪要 、4:活动报名
 			if signupType == 1 {
 				go services.ActivityUserRemind(user, activityInfo, 1)
-				resp.PopupMsg = item.CountryCode + "-" + item.Mobile + "<br/>预约成功,已加入您的活动日程<br/><br/>想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号"
+				resp.PopupMsg = "<b>预约成功,已加入您的活动日程</b><br/><br/>想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号"
 			} else if signupType == 4 {
 				go services.ActivityUserRemind(user, activityInfo, 4)
-				resp.PopupMsg = item.CountryCode + "-" + item.Mobile + "<b>报名成功,请复制腾讯会议号打开腾讯会议app参会</b><br/>想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号"
+				resp.PopupMsg = "<b>报名成功,请复制腾讯会议号打开腾讯会议app参会</b><br/>想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号"
 			} else {
 				go services.ActivityUserRemind(user, activityInfo, 4)
 				resp.PopupMsg = "<b>报名成功,已加入您的活动日程</b><br/>想要及时获取活动时间变更通知,请关注【查研观向小助手】公众号"

+ 7 - 5
services/activity.go

@@ -405,7 +405,8 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
 func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.ActivityDetail) (havePower bool, err error) {
 	var companyDetailStatus string
 	var userTypeStr string
-	if user.CompanyId == utils.HZ_COMPANY_ID {
+	//如果是弘则的用户或者宏观的权限不做校验
+	if user.CompanyId == utils.HZ_COMPANY_ID || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
 		havePower = true
 		return
 	}
@@ -472,7 +473,10 @@ 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 (strings.Contains(activityInfo.ChartPermissionName, "研选") || activityInfo.ChartPermissionName == "策略") && strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
+		havePower = true
+		return
+	}
 	if activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 6 || activityInfo.ActivityTypeId == 7 {
 		if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") {
 			havePower = true
@@ -490,9 +494,7 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
 	if !havePower {
 		return
 	}
-	if (strings.Contains(activityInfo.ChartPermissionName, "研选") || activityInfo.ChartPermissionName == "策略") && strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
-		havePower = true
-	}
+
 	//如果是易董的活动且属于研选类型,只要开通任何权限就可以查看详情
 	if activityInfo.YidongActivityId != "" && permissionStr != "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 		havePower = true