Commit 8ddab344 authored by chenweijian's avatar chenweijian

邀请派对

parent 1babf36f
......@@ -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
......
......@@ -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(&param); err != nil {
return myCtx, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment