|
@@ -467,6 +467,31 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if activityInfo.IsLimitPeople > 0 {
|
|
|
+ var noPower bool
|
|
|
+ if (userType == 1 || userType == 4 || userType == 5) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(userType)) {
|
|
|
+ noPower = true
|
|
|
+ }
|
|
|
+ //带有专家权限的 2、大套餐客户(4个行业全开通的正式客户) 3、分行业套餐客户(开通对应行业的正式客户)
|
|
|
+ if userType == 2 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
+ noPower = true
|
|
|
+ }
|
|
|
+ if userType == 2 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(2)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
+ noPower = true
|
|
|
+ }
|
|
|
+ if userType == 3 && strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(4)) {
|
|
|
+ noPower = true
|
|
|
+ }
|
|
|
+ if userType == 3 && !strings.Contains(permissionStr, "专家") && !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) {
|
|
|
+ noPower = true
|
|
|
+ }
|
|
|
+ if noPower {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "被分享客户不可见,获取信息失败,Err:"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fmt.Println("权限可见校验")
|
|
|
detail, errDetail := models.GetActivityTypeDetailById(activityInfo.ActivityTypeId)
|
|
|
if errDetail != nil {
|
|
|
br.Msg = "获取信息失败"
|