xingzai 1 rok temu
rodzic
commit
c980a9786a

+ 24 - 1
controllers/activity_special.go

@@ -246,6 +246,16 @@ func (this *ActivitySpecialCoAntroller) SpecialTripAdd() {
 			itemBill.RegisterPlatform = 1
 			itemBill.RegisterPlatform = 1
 			itemBill.ChartPermissionId = activityInfo.ChartPermissionId
 			itemBill.ChartPermissionId = activityInfo.ChartPermissionId
 
 
+			var itemMeeting = new(models.CygxActivitySpecialMeetingDetail)
+			itemMeeting.UserId = user.UserId
+			itemMeeting.ActivityId = activityId
+			itemMeeting.CreateTime = time.Now()
+			itemMeeting.Mobile = user.Mobile
+			itemMeeting.Email = user.Email
+			itemMeeting.CompanyId = user.CompanyId
+			itemMeeting.CompanyName = user.CompanyName
+			itemMeeting.RealName = user.RealName
+
 			go services.ActivitySpecialUserRmind(user, activityId, 2)
 			go services.ActivitySpecialUserRmind(user, activityId, 2)
 			//判断是删除还是添加
 			//判断是删除还是添加
 			if total == 0 {
 			if total == 0 {
@@ -309,7 +319,20 @@ func (this *ActivitySpecialCoAntroller) SpecialTripAdd() {
 					itemBill.BillDetailed = 0 //48小时之内,取消报名之后二次报名,不扣除流水记录
 					itemBill.BillDetailed = 0 //48小时之内,取消报名之后二次报名,不扣除流水记录
 				}
 				}
 			}
 			}
-			go models.AddCygxActivitySpecialTripBill(itemBill)
+			//添加流水记录
+			err = models.AddCygxActivitySpecialTripBill(itemBill)
+			if err != nil {
+				br.Msg = "报名失败,"
+				br.ErrMsg = "AddCygxActivitySpecialTripBill,Err:" + err.Error()
+				return
+			}
+			//添加数据到会信息
+			err = models.AddCygxActivitySpecialMeetingDetail(itemMeeting)
+			if err != nil {
+				br.Msg = "报名失败,"
+				br.ErrMsg = "AddCygxActivitySpecialMeetingDetail,Err:" + err.Error()
+				return
+			}
 		}
 		}
 	} else {
 	} else {
 		hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
 		hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)

+ 27 - 0
models/activity_special_meeting_detail.go

@@ -0,0 +1,27 @@
+package models
+
+import (
+	"github.com/beego/beego/v2/client/orm"
+	"time"
+)
+
+type CygxActivitySpecialMeetingDetail struct {
+	Id          int       `orm:"column(id);pk"`
+	UserId      int       `description:"用户id"`
+	ActivityId  int       `description:"活动ID"`
+	CreateTime  time.Time `description:"创建时间"`
+	Mobile      string    `description:"手机号"`
+	Email       string    `description:"邮箱号"`
+	CompanyId   int       `description:"公司ID"`
+	CompanyName string    `description:"公司名称"`
+	IsMeeting   int       `description:"是否到会  1.是 ,0否"`
+	IsAirborne  int       `description:"是否属于空降  1.是 ,0否"`
+	RealName    string    `description:"真实姓名"`
+}
+
+// 添加
+func AddCygxActivitySpecialMeetingDetail(item *CygxActivitySpecialMeetingDetail) (err error) {
+	o := orm.NewOrm()
+	_, err = o.Insert(item)
+	return
+}

+ 1 - 0
models/db.go

@@ -98,6 +98,7 @@ func init() {
 		new(CygxUserFreeeButton),
 		new(CygxUserFreeeButton),
 		new(UserInvitee),
 		new(UserInvitee),
 		new(CygxActivitySpecialSignup),
 		new(CygxActivitySpecialSignup),
+		new(CygxActivitySpecialMeetingDetail),
 		new(CygxUserFollowSpecial),
 		new(CygxUserFollowSpecial),
 		new(CygxChart),
 		new(CygxChart),
 		new(CygxChartCollect),
 		new(CygxChartCollect),