Browse Source

test

tags/v4.3.1
huangjiajun 1 year ago
parent
commit
94a3cf6d78
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      rule/self_buy_global.go

+ 4
- 0
rule/self_buy_global.go View File

@@ -222,6 +222,7 @@ func Pool(eg *xorm.Engine, price string) error {
userSumMap[v["uid"]] -= leave
}
}
var RealBonusValue float64 = 0
for k, v := range userSumMap {
if v <= 0 {
continue
@@ -231,7 +232,10 @@ func Pool(eg *xorm.Engine, price string) error {
session.Rollback()
return errors.New("失败")
}
RealBonusValue += v
}
bonus.RealBonusValue = zhios_order_relate_utils.Float64ToStrByPrec(RealBonusValue, 2)
bonus.LossBonusValue = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(price)-RealBonusValue, 2)
bonus.BonusUserNum = zhios_order_relate_utils.IntToStr(sum)
bonus.BonusUserRecord = zhios_order_relate_utils.SerializeStr(userSumMap)
bonus.BonusPeriod = bonus.Id


Loading…
Cancel
Save