From 8f5d2e5a8f0a1c90aa89f4bfb294f86b8391db02 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 13 Nov 2024 10:55:59 +0800 Subject: [PATCH] 1 --- server/wheelserver/api/v1/shop/shop.go | 1 + server/wheelserver/model/chip.go | 1 + 2 files changed, 2 insertions(+) diff --git a/server/wheelserver/api/v1/shop/shop.go b/server/wheelserver/api/v1/shop/shop.go index 0d96771d..9aeddd0f 100644 --- a/server/wheelserver/api/v1/shop/shop.go +++ b/server/wheelserver/api/v1/shop/shop.go @@ -84,6 +84,7 @@ func (this *ShopApi) Buy(c *gin.Context) { chip.AccountId = s.GetAccountId() chip.ItemId = itemMeta.GetId() chip.ItemNum = 1 + chip.ExpireTime = int32(nowTime) chip.CreateTime = int32(nowTime) chip.ModifyTime = int32(nowTime) if chip.Create() != nil { diff --git a/server/wheelserver/model/chip.go b/server/wheelserver/model/chip.go index e1bfa0cd..365a4f5d 100644 --- a/server/wheelserver/model/chip.go +++ b/server/wheelserver/model/chip.go @@ -10,6 +10,7 @@ type Chip struct { AccountId string `gorm:"column:account_id;primaryKey"` ItemId int32 `gorm:"column:item_id"` ItemNum int32 `gorm:"column:item_num"` + ExpireTime int32 `gorm:"column:expiretime;<-:create"` CreateTime int32 `gorm:"column:createtime;<-:create"` ModifyTime int32 `gorm:"column:modifytime"` }