1
This commit is contained in:
parent
3330cfdee4
commit
10621db90a
@ -141,6 +141,7 @@ func (this *stackingCec) apply(idx int64, eventName string,
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
srcAmount := "0"
|
srcAmount := "0"
|
||||||
|
srcGrowthValue := "0"
|
||||||
{
|
{
|
||||||
dbErr, ds := f5.GetGoStyleDb().NewOrmSelect(
|
dbErr, ds := f5.GetGoStyleDb().NewOrmSelect(
|
||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
@ -158,12 +159,17 @@ func (this *stackingCec) apply(idx int64, eventName string,
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
srcAmount = ds.GetByName("amount")
|
srcAmount = ds.GetByName("amount")
|
||||||
|
srcGrowthValue = ds.GetByName("growth_value")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bnNewAmount, ok := new(big.Int).SetString(srcAmount, 10)
|
bnNewAmount, ok := new(big.Int).SetString(srcAmount, 10)
|
||||||
if !ok {
|
if !ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
bnNewGrowthValue, ok := new(big.Int).SetString(srcGrowthValue, 10)
|
||||||
|
if !ok {
|
||||||
|
return false
|
||||||
|
}
|
||||||
bnNewAmount.Add(bnNewAmount, bnAmount)
|
bnNewAmount.Add(bnNewAmount, bnAmount)
|
||||||
{
|
{
|
||||||
nowTime := f5.GetApp().GetRealSeconds()
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
@ -184,7 +190,7 @@ func (this *stackingCec) apply(idx int64, eventName string,
|
|||||||
{"token_address", strings.ToLower(p.Token)},
|
{"token_address", strings.ToLower(p.Token)},
|
||||||
{"amount", bnNewAmount.String()},
|
{"amount", bnNewAmount.String()},
|
||||||
{"last_apply_record_idx", q5.ToString(idx)},
|
{"last_apply_record_idx", q5.ToString(idx)},
|
||||||
{"growth_value", q5.ToString(0)},
|
{"growth_value", bnNewGrowthValue.String()},
|
||||||
{"growth_value_int64", q5.ToString(0)},
|
{"growth_value_int64", q5.ToString(0)},
|
||||||
{"vip_lv", q5.ToString(0)},
|
{"vip_lv", q5.ToString(0)},
|
||||||
{"createtime", q5.ToString(nowTime)},
|
{"createtime", q5.ToString(nowTime)},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user