diff --git a/rule/block_star_chain_settlement.go b/rule/block_star_chain_settlement.go index ebffc61..a40f8b2 100644 --- a/rule/block_star_chain_settlement.go +++ b/rule/block_star_chain_settlement.go @@ -62,6 +62,13 @@ func DailySettlementBlockStarChain(engine *xorm.Engine, mid string, isTask bool) todayPublishCoin := zhios_order_relate_utils.StrToFloat64(blockStarChain.TodayPublishCoin) //今日区块币发行数量(若为0,则按当前每日区块币发行数量) nowEverydayPublishCoin := zhios_order_relate_utils.StrToFloat64(blockStarChain.NowEverydayPublishCoin) //当前每日区块币发行数量 + //2、进行系统区块币发放 + err = dealIssueCoin(session, int(enum.SystemTimingIssue), nowEverydayPublishCoin, enum.SystemTimingIssue.String(), blockStarChain) + if err != nil { + _ = session.Rollback() + return err + } + //2、判断今日是否有系统销毁 var destroyCoinForSystem string if todayPublishCoin != 0 && todayPublishCoin != nowEverydayPublishCoin { @@ -77,15 +84,8 @@ func DailySettlementBlockStarChain(engine *xorm.Engine, mid string, isTask bool) } nowEverydayPublishCoin = todayPublishCoin } - var publishCoin = nowEverydayPublishCoin - - //3、进行系统区块币发放 - err = dealIssueCoin(session, int(enum.SystemTimingIssue), publishCoin, enum.SystemTimingIssue.String(), blockStarChain) - if err != nil { - _ = session.Rollback() - return err - } + var publishCoin = nowEverydayPublishCoin userIds, err := db.UserLevelDescByWeightLow(session) if err != nil { _ = session.Rollback()