Browse Source

update 区块星链

tags/v3.4.9
DengBiao 2 years ago
parent
commit
869e675df3
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      rule/block_star_chain_settlement.go

+ 4
- 2
rule/block_star_chain_settlement.go View File

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


Loading…
Cancel
Save