diff --git a/dbstruct/zonemoment.go b/dbstruct/zonemoment.go index f9cf425c..0cddab4d 100644 --- a/dbstruct/zonemoment.go +++ b/dbstruct/zonemoment.go @@ -120,6 +120,7 @@ func (p *ZoneMoment) GetPaidText() string { return "" } +<<<<<<< HEAD type ZoneMomentStatInfo struct { Mid *int64 `json:"id" bson:"_id"` // mid Count *int64 `json:"count" bson:"count"` // count @@ -139,6 +140,13 @@ func (p *ZoneMomentStatInfo) GetCount() int64 { return 0 } -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) }