From 6f8eb8abe08bcfe3db4b928b956e5be382daa421 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 6 Aug 2024 20:10:40 +0800 Subject: [PATCH] update --- rule/service_award_dividend/reset.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rule/service_award_dividend/reset.go b/rule/service_award_dividend/reset.go index ba17498..6378a73 100644 --- a/rule/service_award_dividend/reset.go +++ b/rule/service_award_dividend/reset.go @@ -35,10 +35,18 @@ func ResetServiceAwardDividendRelation(ch *rabbit.Channel, engine *xorm.Engine, //1、查找 `service_award_dividend_basic` 基础设置 serviceAwardDividendBasicDb := implement.NewServiceAwardDividendBasicDb(engine) base, _ := serviceAwardDividendBasicDb.GetServiceAwardDividendBasic() + if base == nil { + err = errors.New("服务奖分红未设置!") + return + } if base.IsOpen != 1 { err = errors.New("服务奖分红未开启!") return } + if base.IsRefreshAllocation != 1 { + err = errors.New("服务奖分红未开启重新分配!") + return + } now := time.Now() today := now.Format("2006-01-02") if base.RefreshAllocation != today {