From 1897d781c5b4d32c2e5d4f66dae7fb8a06b6d910 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 28 Dec 2023 16:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rule/consume_integral_settlement.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rule/consume_integral_settlement.go b/rule/consume_integral_settlement.go index 655c126..1d5e8f4 100644 --- a/rule/consume_integral_settlement.go +++ b/rule/consume_integral_settlement.go @@ -48,11 +48,12 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask }) fmt.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", now.Hour()) - settleTime, err := time.ParseInLocation("2006-01-02 15:04:05", today+subsidyBase.SettleTime, time.Local) + settleTime, err := time.ParseInLocation("2006-01-02 15:04:05", today+" "+subsidyBase.SettleTime+":00", time.Local) if err != nil { + session.Rollback() return } - if isTask && (now.Hour() > 8) && now.After(settleTime) { + if isTask && (now.Hour() > 8 || now.Before(settleTime)) { session.Rollback() //TODO::结算时间 ~ 凌晨 8 点运行 return errors.New("非运行时间")