diff --git a/rule/block_star_chain_settlement.go b/rule/block_star_chain_settlement.go index 395bed9..dcc4d79 100644 --- a/rule/block_star_chain_settlement.go +++ b/rule/block_star_chain_settlement.go @@ -241,7 +241,7 @@ func statisticsAndDistributeCoinForStatic(session *xorm.Session, userIds []int, getCoin = getCoin.Sub(tempCoin) needDestroyContribution = coinAmountValue } - unassignedTotalCoin.Add(getCoin) + unassignedTotalCoin = unassignedTotalCoin.Add(getCoin) //3.2给相应用户加上分配到的虚拟币 err = DealUserCoin(session, md.DealUserCoinReq{ @@ -327,7 +327,7 @@ func statisticsAndDistributeCoinForDynamic(session *xorm.Session, userIds []int, getCoin = getCoin.Sub(tempCoin) needDestroyContribution = coinAmountValue } - unassignedTotalCoin.Add(getCoin) + unassignedTotalCoin = unassignedTotalCoin.Add(getCoin) //3.2给相应用户加上分配到的虚拟币 err = DealUserCoin(session, md.DealUserCoinReq{ @@ -413,7 +413,7 @@ func statisticsAndDistributeCoinForOperationCenter(session *xorm.Session, mid st singleValue = singleValue.Sub(tempCoin) needDestroyContribution = coinAmountValue } - totalCoin.Add(singleValue) + totalCoin = totalCoin.Add(singleValue) //3.2给相应用户加上分配到的虚拟币 err = DealUserCoin(session, md.DealUserCoinReq{ Kind: "add", @@ -505,7 +505,7 @@ func statisticsAndDistributeCoinForOther(session *xorm.Session, mid string, publ singleValue = singleValue.Sub(tempCoin) needDestroyContribution = coinAmountValue } - totalCoin.Add(singleValue) + totalCoin = totalCoin.Add(singleValue) //3.2给相应用户加上分配到的虚拟币 err = DealUserCoin(session, md.DealUserCoinReq{ Kind: "add",