From 3df44c25549cc5c4d38575b4cd75cbf06faf9bda Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 28 Jul 2022 18:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=93=E5=85=B7=E5=88=9B=E5=BB=BA=E6=97=B6?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/items/modelitems.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index 12d825b06..d2d9a2ee1 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -323,6 +323,9 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte CTime: time.Now().Unix(), IsNewItem: isNew, } + if conf.Time > 0 { + grid.ETime = time.Now().Add(time.Minute * time.Duration(conf.Time)).Unix() + } items = append(items, grid) add = append(add, grid) leftnum = 0 @@ -337,6 +340,9 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte CTime: time.Now().Unix(), IsNewItem: isNew, } + if conf.Time > 0 { + grid.ETime = time.Now().Add(time.Minute * time.Duration(conf.Time)).Unix() + } items = append(items, grid) add = append(add, grid) index++