This commit is contained in:
aozhiwei 2024-11-13 14:27:14 +08:00
parent dd4c0cd123
commit d6a3673293

View File

@ -3,6 +3,7 @@ package vo
import (
"f5"
"main/model"
"main/mt"
)
type Chip struct {
@ -15,5 +16,8 @@ func (this *Chip) FromModel(m *model.Chip) {
nowTime := f5.GetApp().GetRealSeconds()
this.ItemId = m.ItemId
this.LeftTime = int32(nowTime) - m.ExpireTime
this.TotalTime = int32(nowTime) - m.ExpireTime
itemMeta := mt.Table.Item.GetById(int64(this.ItemId))
if itemMeta != nil {
this.TotalTime = itemMeta.GetTime()
}
}