|
|
@@ -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 { |
|
|
|