From fa5cb99a17f2898eb216877738dc1a17538f2b15 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Thu, 13 Jun 2024 19:22:03 +0800 Subject: [PATCH] fx --- dbstruct/zonemoment.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dbstruct/zonemoment.go b/dbstruct/zonemoment.go index 21119699..017bbd6b 100644 --- a/dbstruct/zonemoment.go +++ b/dbstruct/zonemoment.go @@ -120,6 +120,13 @@ func (p *ZoneMoment) GetPaidText() string { return "" } -func (p *ZoneMoment) GetCoinPrice() int64 { - return util.RoundUp(float64(p.CoinPrice) / 10.0) +func (p *ZoneMoment) GetPrice() int64 { + if p != nil && p.Price != nil { + return *p.Price + } + return 0 +} + +func (p *ZoneMoment) GetCoinPrice() int64 { + return util.RoundUp(float64(p.GetPrice()) / 10.0) }