Browse Source

no message

xingzai 1 year ago
parent
commit
d4b12723da
2 changed files with 37 additions and 2 deletions
  1. 32 2
      controllers/activity.go
  2. 5 0
      utils/constants.go

+ 32 - 2
controllers/activity.go

@@ -989,6 +989,17 @@ func (this *ActivityController) SignupAdd() {
 			br.Data = resp
 			return
 		}
+		//限制人数为1人的专家电话会 用户操作时的消息提示
+		if activityInfo.LimitPeopleNum == 1 && activityInfo.ActivityTypeId == 1 {
+			resp.HasPermission = hasPermission
+			resp.SignupStatus = utils.FULLSTARFFED_MSG
+			resp.PopupMsg = utils.ACTIVITY_ZJDHH_V1_MSG
+			br.Ret = 200
+			br.Success = true
+			br.Msg = ""
+			br.Data = resp
+			return
+		}
 		var sellerName string
 		sellerName, err = models.GetCompanySellerName(user.CompanyId)
 		if err != nil {
@@ -1414,8 +1425,17 @@ func (this *ActivityController) MeetingReminderAdd() {
 			br.Data = resp
 			return
 		}
-		hasPermission = 1
-		signupStatus = "Success"
+		//限制人数为1人的专家电话会 用户操作时的消息提示
+		if activityInfo.LimitPeopleNum == 1 && activityInfo.ActivityTypeId == 1 {
+			resp.HasPermission = hasPermission
+			resp.SignupStatus = utils.FULLSTARFFED_MSG
+			resp.PopupMsg = utils.ACTIVITY_ZJDHH_V1_MSG
+			br.Ret = 200
+			br.Success = true
+			br.Msg = ""
+			br.Data = resp
+			return
+		}
 		totalMeeting, errMeeting := models.GetActivityMeetingReminderCount(uid, activityId)
 		if errMeeting != nil {
 			br.Msg = "获取失败"
@@ -1596,6 +1616,16 @@ func (this *ActivityController) ActivityAppointmentAdd() {
 		item := new(models.CygxActivityAppointment)
 		item.RegisterPlatform = utils.REGISTER_PLATFORM
 		resp.HasPermission = 1
+		//限制人数为1人的专家电话会 用户操作时的消息提示
+		if activityInfo.LimitPeopleNum == 1 && activityInfo.ActivityTypeId == 1 {
+			resp.SignupStatus = utils.FULLSTARFFED_MSG
+			resp.PopupMsg = utils.ACTIVITY_ZJDHH_V1_MSG
+			br.Ret = 200
+			br.Success = true
+			br.Msg = ""
+			br.Data = resp
+			return
+		}
 		totalMeeting, errMeeting := models.GetUserCygxActivityAppointmentCount(uid, activityId)
 		if errMeeting != nil {
 			br.Msg = "获取失败"

+ 5 - 0
utils/constants.go

@@ -249,3 +249,8 @@ const (
 	CYGX_YANXUAN_SPECIAL               = "研选专栏" //用户阅读数据
 	CYGX_YANXUAN_SPECIAL_IMG_PC string = "https://hzstatic.hzinsights.com/cygx/yanxuan_special/special_img_pc.png"
 )
+
+const (
+	ACTIVITY_ZJDHH_V1_MSG string = "该活动为非公开活动,如有专家访谈需求请联系对口销售" // 限制人数为1的专家电话会用户C端报名,提示消息内容
+	FULLSTARFFED_MSG      string = "FullStarffed"              // 报名的时候人数已满的状态
+)