diff --git a/rule/block_star_chain_settlement.go b/rule/block_star_chain_settlement.go index 5bff7a0..0044e5d 100644 --- a/rule/block_star_chain_settlement.go +++ b/rule/block_star_chain_settlement.go @@ -414,7 +414,7 @@ func statisticsAndDistributeCoinForOperationCenter(session *xorm.Session, mid st return err, unassignedTotalCoinValue } if totalUser > 0 { - singleValue := publishCoinValue.Div(decimal.NewFromInt(totalUser)) // 得到的区块币 + originalSingleValue := publishCoinValue.Div(decimal.NewFromInt(totalUser)) // 得到的区块币 var userIds []int for _, item := range userList { @@ -427,6 +427,7 @@ func statisticsAndDistributeCoinForOperationCenter(session *xorm.Session, mid st return err, unassignedTotalCoinValue } for _, item := range userVirtualAmounts { + singleValue := originalSingleValue needDestroyContribution := singleValue.Mul(platformGuidePriceForCoinValue) //需销毁贡献值 coinAmount, err := svc.GetUserCoinAmount(session, mid, chain.Coin2, item.Uid) //获取此时用户的"静态贡献值" if err != nil { @@ -505,7 +506,7 @@ func statisticsAndDistributeCoinForOther(session *xorm.Session, mid string, publ return err, unassignedTotalCoinValue } if totalUser > 0 { - singleValue := publishCoinValue.Div(decimal.NewFromInt(totalUser)) // 得到的区块币 + originalSingleValue := publishCoinValue.Div(decimal.NewFromInt(totalUser)) // 得到的区块币 var userIds []int for _, item := range userList { @@ -519,6 +520,7 @@ func statisticsAndDistributeCoinForOther(session *xorm.Session, mid string, publ } for _, item := range userVirtualAmounts { + singleValue := originalSingleValue needDestroyContribution := singleValue.Mul(platformGuidePriceForCoinValue) //需销毁贡献值 coinAmount, err := svc.GetUserCoinAmount(session, mid, chain.Coin2, item.Uid) //获取此时用户的"静态贡献值" if err != nil {