浏览代码

活动详情C类电话会字段添加

xingzai 2 年之前
父节点
当前提交
7e3d6e42b9
共有 3 个文件被更改,包括 9 次插入2 次删除
  1. 5 2
      controllers/activity.go
  2. 1 0
      models/activity.go
  3. 3 0
      services/activity.go

+ 5 - 2
controllers/activity.go

@@ -590,6 +590,9 @@ func (this *ActivityCoAntroller) Detail() {
 		br.ErrMsg = "活动ID错误,Err:" + "activityId:" + strconv.Itoa(activityId)
 		return
 	}
+	if activityInfo.ActivityTypeId == utils.C_CLASS_ACTIVITY_TYPE_ID {
+		activityInfo.IsCClassMeeting = true
+	}
 	applyCount, err := models.GetApplyRecordCount(uid)
 	if err != nil && err.Error() != utils.ErrNoRow() {
 		br.Msg = "获取信息失败"
@@ -1048,10 +1051,10 @@ func (this *ActivityCoAntroller) SignupAdd() {
 				br.ErrMsg = "获取对应销售失败,Err:" + err.Error()
 				return
 			}
-
 			//人数已满:FullStarffed、单机构超过两人:TwoPeople、爽约次数过多:BreakPromise、超时:Overtime 、成功:Success"`
 			//如果是下面几种情况则对报名信息做判断限制 (公司调研电话会(限制人数)、公司线下调研、专家/分析师线下沙龙)
-			if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
+			//if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
+			if activityInfo.IsLimitPeople == 1 {
 				//判断优先级:总人数限制→单机构2人限制→爽约3次限制
 				totalRestrict, err := models.GetUserRestrictCount(user.Mobile)
 				if err != nil {

+ 1 - 0
models/activity.go

@@ -106,6 +106,7 @@ type ActivityDetail struct {
 	Scale                   string `description:"管理规模,空不填,1::50亿以下,2:50~100亿,3:100亿以上。多个用, 隔开"`
 	IsShowAppointment       bool   `description:"是否展示预约纪要"`
 	IsHideAppointment       int    `description:"是否隐藏预约纪要按钮  1是,0 否"`
+	IsCClassMeeting         bool   `description:"是否是c类电话会"`
 	ArticleList             []*ActivityArticleResp
 }
 

+ 3 - 0
services/activity.go

@@ -534,6 +534,9 @@ func GetActivityonditionList(user *models.WxUserItem, activityTypeId, chartPermi
 	} else {
 		conditionOr += ` OR ( art.is_limit_people = 0 ` + condition + `) `
 	}
+	if userType == 6 || userType == 7 {
+		conditionOr += ` OR (   art.customer_type_ids LIKE '%` + strconv.Itoa(userType) + `%'	 ` + condition + `) `
+	}
 	if companyProduct != nil {
 		if companyProduct.Scale != "" {
 			conditionOr += ` OR (  art.scale LIKE '%` + companyProduct.Scale + `%'	 ` + condition + `) `