Browse Source

update 区块星链

tags/v3.0.3
DengBiao 2 years ago
parent
commit
75f59c730b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      rule/block_star_chain_settlement.go

+ 2
- 2
rule/block_star_chain_settlement.go View File

@@ -210,7 +210,7 @@ func statisticsAndDistributeCoinForStatic(session *xorm.Session, userIds []int,
var userVirtualAmount model.UserVirtualAmount var userVirtualAmount model.UserVirtualAmount
var userVirtualAmounts []model.UserVirtualAmount var userVirtualAmounts []model.UserVirtualAmount
//1、统计出静态区总贡献值 //1、统计出静态区总贡献值
sumStatic, err := session.Table("user_virtual_amount").In("uid", userIds).Where("coin_id =?", chain.Coin2).Sum(&userVirtualAmount, "amount")
sumStatic, err := session.Table("user_virtual_amount").NotIn("uid", userIds).Where("coin_id =?", chain.Coin2).Sum(&userVirtualAmount, "amount")
if err != nil { if err != nil {
return err, unassignedTotalCoinValue return err, unassignedTotalCoinValue
} }
@@ -289,7 +289,7 @@ func statisticsAndDistributeCoinForDynamic(session *xorm.Session, userIds []int,
var userVirtualAmounts []model.UserVirtualAmount var userVirtualAmounts []model.UserVirtualAmount


//1、统计出动态区总贡献值 //1、统计出动态区总贡献值
sumStatic, err := session.Table("user_virtual_amount").In("uid", userIds).Where("coin_id =?", chain.Coin3).Sum(&userVirtualAmount, "amount")
sumStatic, err := session.Table("user_virtual_amount").NotIn("uid", userIds).Where("coin_id =?", chain.Coin3).Sum(&userVirtualAmount, "amount")
if err != nil { if err != nil {
return err, unassignedTotalCoinValue return err, unassignedTotalCoinValue
} }


Loading…
Cancel
Save