From 05c3962029ff98e849fd14c3e35459dd8bbbfcc8 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 19 Jan 2024 18:42:38 +0800 Subject: [PATCH] update --- .../one_circles/one_circles_sign_in_green_energy_settlement.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rule/one_circles/one_circles_sign_in_green_energy_settlement.go b/rule/one_circles/one_circles_sign_in_green_energy_settlement.go index 2fcc673..e7ccade 100644 --- a/rule/one_circles/one_circles_sign_in_green_energy_settlement.go +++ b/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)