Browse Source

update

master
shenjiachi 2 days ago
parent
commit
85757e2f16
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      app/svc/svc_home_page.go

+ 4
- 1
app/svc/svc_home_page.go View File

@@ -22,7 +22,10 @@ func CalcTodayEggEnergyPriceRises(engine *xorm.Engine, now time.Time) (err error
return err, 0, false, "", "" return err, 0, false, "", ""
} }
initialPrice = m.Price initialPrice = m.Price
yesterdayPrice, _ := decimal.NewFromString(m.Price)
if initialPrice == "" {
initialPrice = "1"
}
yesterdayPrice, _ := decimal.NewFromString(initialPrice)
coreDataDb := implement.NewEggEnergyCoreDataDb(db.Db) coreDataDb := implement.NewEggEnergyCoreDataDb(db.Db)
coreData, err := coreDataDb.EggEnergyCoreDataGet() coreData, err := coreDataDb.EggEnergyCoreDataGet()
if err != nil { if err != nil {


Loading…
Cancel
Save