瀏覽代碼

update

master
DengBiao 11 月之前
父節點
當前提交
05c3962029
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 2
- 1
rule/one_circles/one_circles_sign_in_green_energy_settlement.go 查看文件

@@ -182,7 +182,8 @@ func CalcTodayGreenEnergyPriceRises(engine *xorm.Engine, oneCirclesGreenEnergyBa

//2、查找昨日价格
var m model.OneCirclesGreenEnergyPrice
if has, err := engine.Where("date =?", now.AddDate(0, 0, -1).Format("2006-01-02")).Desc("hour").Get(&m); err != nil || has == false {
if has, err1 := engine.Where("date =?", now.AddDate(0, 0, -1).Format("2006-01-02")).Desc("hour").Get(&m); err1 != nil || has == false {
err = err1
return
}
yesterdayPrice, _ := decimal.NewFromString(m.Price)


Loading…
取消
儲存