This commit is contained in:
suyl
2021-05-13 13:47:38 +08:00
parent 9293116e03
commit b43d885436
3 changed files with 15 additions and 4 deletions

View File

@@ -372,13 +372,16 @@ func Pay4User(ctx *jxcontext.Context, thingID int, vendorOrderID string, payType
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
err = dao.CreateEntity(dao.GetDB(), orderPay)
}
mobile, userID := ctx.GetMobileAndUserID()
userMember := &model.UserMember{
VendorOrderID: vendorOrderID,
UserID: ctx.GetUserID(),
UserID: userID,
MemberType: model.MemberTypeDiscountCard,
EndAt: utils.Str2Time(time.Now().AddDate(0, 1, 0).AddDate(0, 0, -1).Format("2006-01-02") + " 23:59:59"),
MemberTypeID: thingID,
IsPay: model.NO,
VendorID: model.VendorIDJX,
Mobile: mobile,
}
dao.WrapAddIDCULDEntity(userMember, ctx.GetUserName())
if flag == 0 {