xingzai před 2 roky
rodič
revize
f056490115
1 změnil soubory, kde provedl 13 přidání a 10 odebrání
  1. 13 10
      controllers/activity.go

+ 13 - 10
controllers/activity.go

@@ -683,16 +683,19 @@ func (this *ActivityCoAntroller) SignupAdd() {
 				resp.PopupMsg = "由于爽约次数过多,您暂时被限制报名资格,请联系对口销售"
 				item.FailType = 3
 			}
-			totalSignupCompany, err := models.GetActivitySignupCompanyCount(activityId, user.CompanyId)
-			if err != nil {
-				br.Msg = "获取信息失败"
-				br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
-				return
-			}
-			if totalSignupCompany >= 2 {
-				signupStatus = "TwoPeople"
-				resp.PopupMsg = "单机构最多2人报名同一活动,您所在机构报名人数已满"
-				item.FailType = 2
+			//弘则下面的用户不做单机构两人限制
+			if user.CompanyId != utils.HZ_COMPANY_ID {
+				totalSignupCompany, err := models.GetActivitySignupCompanyCount(activityId, user.CompanyId)
+				if err != nil {
+					br.Msg = "获取信息失败"
+					br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
+					return
+				}
+				if totalSignupCompany >= 2 {
+					signupStatus = "TwoPeople"
+					resp.PopupMsg = "单机构最多2人报名同一活动,您所在机构报名人数已满"
+					item.FailType = 2
+				}
 			}
 			totaSignupPeopleNum, err := models.GetActivitySignupSuccessCount(activityId)
 			if err != nil {