|
@@ -328,7 +328,7 @@ func (this *ActivitySpecialCoAntroller) SpecialDetail() {
|
|
}
|
|
}
|
|
|
|
|
|
// @Title报名
|
|
// @Title报名
|
|
-// @Description 感兴趣、不感兴趣接口
|
|
|
|
|
|
+// @Description 报名
|
|
// @Param request body models.ActivityIdRep true "type json string"
|
|
// @Param request body models.ActivityIdRep true "type json string"
|
|
// @Success Ret=200 {object} models.SignupSpecialStatus
|
|
// @Success Ret=200 {object} models.SignupSpecialStatus
|
|
// @router /add [post]
|
|
// @router /add [post]
|
|
@@ -513,15 +513,10 @@ func (this *ActivitySpecialCoAntroller) SpecialTripAdd() {
|
|
resp.HasPermission = hasPermission
|
|
resp.HasPermission = hasPermission
|
|
resp.ActivityId = activityId
|
|
resp.ActivityId = activityId
|
|
if hasPermission == 1 {
|
|
if hasPermission == 1 {
|
|
- resultTime := utils.StrTimeToTime(activityInfo.ActivityTime) //时间字符串格式转时间格式
|
|
|
|
- if time.Now().After(resultTime.Add(-time.Minute * 60)) {
|
|
|
|
- resp.SignupStatus = 4
|
|
|
|
- resp.PopupMsg = "感谢参与,本次报名会扣除一次贵司在弘则的调研点数。"
|
|
|
|
- resp.PopupMsg2 = "由于每场活动人数有限,如果不能参加请提前48小时取消,未及时取消导致影响其他客户报名将会维持扣点。"
|
|
|
|
- br.Ret = 200
|
|
|
|
- br.Success = true
|
|
|
|
- br.Msg = "操作成功"
|
|
|
|
- br.Data = resp
|
|
|
|
|
|
+ signupStatus, popupMsg, popupMsg2, err := services.SpecialTripPopupMsg(activityInfo, user)
|
|
|
|
+ if err != nil {
|
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
|
+ br.ErrMsg = "SpecialTripPopupMsg,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
total, err := models.GetUserActivitySpecialTripCount(user.UserId, activityId)
|
|
total, err := models.GetUserActivitySpecialTripCount(user.UserId, activityId)
|
|
@@ -530,6 +525,9 @@ func (this *ActivitySpecialCoAntroller) SpecialTripAdd() {
|
|
br.ErrMsg = "获取日程数量信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取日程数量信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ resp.PopupMsg = popupMsg
|
|
|
|
+ resp.PopupMsg2 = popupMsg2
|
|
|
|
+ resp.SignupStatus = signupStatus
|
|
//判断是删除还是添加
|
|
//判断是删除还是添加
|
|
if total == 0 {
|
|
if total == 0 {
|
|
//获取销售信息
|
|
//获取销售信息
|