xingzai 3 жил өмнө
parent
commit
c6f6ef739c
1 өөрчлөгдсөн 3 нэмэгдсэн , 41 устгасан
  1. 3 41
      controllers/activity.go

+ 3 - 41
controllers/activity.go

@@ -364,20 +364,6 @@ func (this *ActivityCoAntroller) Detail() {
 			}
 		}
 	}
-
-	//if userType == 3 {
-	//	if !strings.Contains(permissionStr, "专家") && activityInfo.LimitPeopleNum > 0 && (!strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(3)) || activityInfo.CustomerTypeIds == "4") {
-	//		br.Msg = "您暂无权限查看该活动"
-	//		br.ErrMsg = "您暂无权限查看该活动,uid:" + strconv.Itoa(uid) + "activityId :" + strconv.Itoa(activityId)
-	//		return
-	//	}
-	//} else {
-	//	if !strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(userType)) && activityInfo.LimitPeopleNum > 0 {
-	//		br.Msg = "您暂无权限查看该活动"
-	//		br.ErrMsg = "您暂无权限查看该活动,uid:" + strconv.Itoa(uid) + "activityId :" + strconv.Itoa(activityId)
-	//		return
-	//	}
-	//}
 	detail, errDetail := models.GetActivityTypeDetailById(activityInfo.ActivityTypeId)
 	if errDetail != nil {
 		br.Msg = "获取信息失败"
@@ -446,7 +432,7 @@ func (this *ActivityCoAntroller) Detail() {
 			hasPermission = 1
 			resp.HaqveJurisdiction = true
 		} else {
-			if permissionStr == "专家" || activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3 {
+			if permissionStr == "专家" {
 				resp.PopupMsg = "您暂无权限参加【" + activityInfo.ActivityTypeName + "】类型活动"
 				resp.MsgType = "Type"
 			} else {
@@ -616,18 +602,6 @@ func (this *ActivityCoAntroller) SignupAdd() {
 		//1专家电话会、2分析师电话会、3公司调研电话会、4公司线下调研、5专家线下沙龙、6分析师线下沙龙
 		//OperationMode     string `description:"操作方式 Apply:立即申请、Call:拨号 为空则为有权限"`
 		var havePower bool
-		//if (activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 3) && strings.Contains(permissionStr, "专家") && activityInfo.LimitPeopleNum == 0 {
-		//	havePower = true
-		//} else if activityInfo.ActivityTypeId == 3 && strings.Contains(permissionStr, "专家") && companyDetailStatus == "正式" {
-		//	havePower = true
-		//} else if strings.Contains(permissionStr, "专家") && strings.Contains(activityInfo.CustomerTypeIds, "4") {
-		//	havePower = true
-		//} else if strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
-		//	havePower = true
-		//} else if strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(userType)) {
-		//	havePower = true
-		//}
-
 		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") {
@@ -792,7 +766,7 @@ func (this *ActivityCoAntroller) SignupAdd() {
 			resp.SellerName = companyItem.SellerName
 			resp.MsgType = "Type"
 			resp.OperationMode = "Call"
-			if permissionStr == "专家" || activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3 {
+			if permissionStr == "专家" {
 				resp.PopupMsg = "您暂无权限参加【" + activityInfo.ActivityTypeName + "】类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
 				resp.MsgType = "Type"
 			} else if strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
@@ -1169,18 +1143,6 @@ func (this *ActivityCoAntroller) MeetingReminderAdd() {
 		}
 
 		var havePower bool
-		//if activityInfo.ActivityTypeId == 1 && strings.Contains(permissionStr, "专家") {
-		//	havePower = true
-		//} else if activityInfo.ActivityTypeId == 3 && activityInfo.LimitPeopleNum == 0 {
-		//	havePower = true
-		//} else if strings.Contains(permissionStr, "专家") && strings.Contains(activityInfo.CustomerTypeIds, "4") {
-		//	havePower = true
-		//} else if strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
-		//	havePower = true
-		//} else if strings.Contains(activityInfo.CustomerTypeIds, strconv.Itoa(userType)) {
-		//	havePower = true
-		//}
-
 		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") {
@@ -1225,7 +1187,7 @@ func (this *ActivityCoAntroller) MeetingReminderAdd() {
 			resp.SellerName = companyItem.SellerName
 			resp.MsgType = "Type"
 			resp.OperationMode = "Call"
-			if permissionStr == "专家" || activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3 {
+			if permissionStr == "专家" {
 				resp.PopupMsg = "您暂无权限参加【" + activityInfo.ActivityTypeName + "】类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
 				resp.MsgType = "Type"
 			} else if strings.Contains(permissionStr, activityInfo.ChartPermissionName) {