From f550215161c8c755f0ec90786df8229470d0ac53 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Dec 2023 16:30:55 +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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rule/consume_integral_settlement.go b/rule/consume_integral_settlement.go index ff2a979..32e61b6 100644 --- a/rule/consume_integral_settlement.go +++ b/rule/consume_integral_settlement.go @@ -53,10 +53,14 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask return } if isTask && (now.Hour() > 8) && now.After(settleTime) { + session.Rollback() //TODO::结算时间 ~ 凌晨 8 点运行 return errors.New("非运行时间") } - + if isTask && zhios_order_relate_utils.InArr(now.Weekday().String(), []string{"Sunday", "Saturday"}) && subsidyBase.HolidaySettleOpen != 1 { + session.Rollback() + return errors.New("周末不运行") + } if err != nil { _ = session.Rollback() return err