From 8ddab3447e6ec2fa6834d22a88b1a2029da3bb10 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 28 Jun 2023 16:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E6=B4=BE=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain/model/invite_m/invite_apply.go | 4 +++- route/invite_r/party_invite.go | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/domain/model/invite_m/invite_apply.go b/domain/model/invite_m/invite_apply.go index b2780e8..aa44edf 100644 --- a/domain/model/invite_m/invite_apply.go +++ b/domain/model/invite_m/invite_apply.go @@ -18,7 +18,9 @@ type InviteApply struct { } func CreateInviteApply(model *domain.Model, userId, newUserId uint64, platform, recharge, videoUrl string) error { - err := model.DB().Create(InviteApply{UserId: userId, NewUserId: newUserId, Platform: platform, RechargeInfo: recharge, VideoUrl: videoUrl}).Error + err := model.DB().Create(&InviteApply{ + UserId: userId, NewUserId: newUserId, Platform: platform, RechargeInfo: recharge, VideoUrl: videoUrl, + CreatedTime: time.Now()}).Error if err != nil { model.Log.Errorf("CreateInviteApply err:%v", err) return err diff --git a/route/invite_r/party_invite.go b/route/invite_r/party_invite.go index 085767c..f378ba5 100644 --- a/route/invite_r/party_invite.go +++ b/route/invite_r/party_invite.go @@ -37,6 +37,11 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) { VideoUrl string `form:"videoUrl" binding:"required"` } + myUserId, err := req.GetUserId(c) + if err != nil { + return myCtx, err + } + var param paramStr if err := c.ShouldBind(¶m); err != nil { return myCtx, err -- 2.22.0