|
@@ -9,7 +9,7 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-//获取用户已经报名的活动
|
|
|
+// 获取用户已经报名的活动
|
|
|
func GetActivitySignUpUserMap(activityIds []int, user *models.WxUserItem) (mapUserId map[int]int, err error) {
|
|
|
userId := user.UserId
|
|
|
var condition string
|
|
@@ -34,7 +34,7 @@ func GetActivitySignUpUserMap(activityIds []int, user *models.WxUserItem) (mapUs
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//获取用户已经设置会议提醒的活动 cygx_activity_meeting_reminder
|
|
|
+// 获取用户已经设置会议提醒的活动 cygx_activity_meeting_reminder
|
|
|
func GetActivityReminderUserMasp(activityIds []int, user *models.WxUserItem) (mapUserId map[int]int, err error) {
|
|
|
userId := user.UserId
|
|
|
var condition string
|
|
@@ -59,7 +59,7 @@ func GetActivityReminderUserMasp(activityIds []int, user *models.WxUserItem) (ma
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//获取用户已经预约纪要的活动
|
|
|
+// 获取用户已经预约纪要的活动
|
|
|
func GetActivityAppointmentUserMap(activityIds []int, user *models.WxUserItem) (mapUserId map[int]int, err error) {
|
|
|
userId := user.UserId
|
|
|
var condition string
|
|
@@ -84,7 +84,7 @@ func GetActivityAppointmentUserMap(activityIds []int, user *models.WxUserItem) (
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-//活动列表的展示 HandleActivityListButton
|
|
|
+// 活动列表的展示 HandleActivityListButton
|
|
|
func HandleActivityListButton(list []*models.ActivityDetail, user *models.WxUserItem) (items []*models.ActivityDetail, err error) {
|
|
|
var activityIds []int
|
|
|
var activitySpecilalIds []int
|
|
@@ -254,6 +254,13 @@ func HandleActivityListButton(list []*models.ActivityDetail, user *models.WxUser
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ //处理不同的报名方式按钮回显
|
|
|
+ mapActivitySignup, e := GetActivitySignupResp(mapActivityId, user)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetActivityVoiceResp, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//处理视频回放
|
|
|
mapActivityVideo, e := GetActivityVideoResp(mapActivityId)
|
|
|
if e != nil {
|
|
@@ -271,6 +278,7 @@ func HandleActivityListButton(list []*models.ActivityDetail, user *models.WxUser
|
|
|
list[k].AudioLink = true
|
|
|
list[k].VideoDetail = mapActivityVideo[v.ActivityId]
|
|
|
}
|
|
|
+ v.SignupType = mapActivitySignup[v.ActivityId]
|
|
|
items = append(items, ActivityButtonShowSearch(v, user))
|
|
|
}
|
|
|
return
|
|
@@ -313,25 +321,28 @@ func ActivityButtonShowSearch(item *models.ActivityDetail, user *models.WxUserIt
|
|
|
articleDetail.IsShowHelpSsk = true
|
|
|
}
|
|
|
if articleDetail.ActiveState == "1" {
|
|
|
- //新的是否展示规则
|
|
|
- if articleDetail.IsCanAppointmentMinutes == 1 {
|
|
|
- articleDetail.IsShowAppointment = true
|
|
|
- }
|
|
|
//专家电话会 1
|
|
|
+ //专家电话会限制人数的展示我要报名,不限制的展示预约外外呼
|
|
|
if articleDetail.ActivityTypeId == 1 {
|
|
|
- articleDetail.IsShowOutboundCall = true
|
|
|
- if articleDetail.IsLimitPeople == 0 {
|
|
|
- articleDetail.IsShowMeetingReminder = true
|
|
|
- articleDetail.IsShowHelpSsk = true
|
|
|
+ //articleDetail.IsShowOutboundCall = true
|
|
|
+ if articleDetail.LimitPeopleNum == 0 {
|
|
|
+ articleDetail.IsShowOutboundCall = true
|
|
|
+ //articleDetail.IsShowHelpSsk = true
|
|
|
+ } else {
|
|
|
+ articleDetail.IsShowSignup = true
|
|
|
}
|
|
|
+ articleDetail.IsShowMeetingReminder = true
|
|
|
+ articleDetail.IsShowHelpSsk = true
|
|
|
}
|
|
|
|
|
|
//分析师电话会 2
|
|
|
if articleDetail.ActivityTypeId == 2 {
|
|
|
- articleDetail.IsShowOutboundCall = true
|
|
|
if articleDetail.LimitPeopleNum == 0 {
|
|
|
- articleDetail.IsShowMeetingReminder = true
|
|
|
+ articleDetail.IsShowOutboundCall = true
|
|
|
+ } else {
|
|
|
+ articleDetail.IsShowSignup = true
|
|
|
}
|
|
|
+ articleDetail.IsShowMeetingReminder = true
|
|
|
}
|
|
|
|
|
|
//公司调研电话会 3
|
|
@@ -362,6 +373,7 @@ func ActivityButtonShowSearch(item *models.ActivityDetail, user *models.WxUserIt
|
|
|
//分析师电话会(C类) 7
|
|
|
if articleDetail.ActivityTypeId == 7 {
|
|
|
articleDetail.IsShowSignup = true
|
|
|
+ articleDetail.IsShowMeetingReminder = true
|
|
|
}
|
|
|
}
|
|
|
}
|