1
This commit is contained in:
parent
1fc917a116
commit
26be80a811
@ -43,7 +43,6 @@ func (this *vip) Add(accountAddress string, val string, idx int64, valField stri
|
|||||||
}
|
}
|
||||||
nowTime := f5.GetApp().GetRealSeconds()
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
updateKv := [][]string {
|
updateKv := [][]string {
|
||||||
{valField, val},
|
|
||||||
{idxField, q5.ToString(idx)},
|
{idxField, q5.ToString(idx)},
|
||||||
{"modifytime", q5.ToString(nowTime)},
|
{"modifytime", q5.ToString(nowTime)},
|
||||||
}
|
}
|
||||||
@ -60,6 +59,11 @@ func (this *vip) Add(accountAddress string, val string, idx int64, valField stri
|
|||||||
if q5.ToInt64(ds.GetByName(idxField)) >= idx {
|
if q5.ToInt64(ds.GetByName(idxField)) >= idx {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
bnOldVal, _ := new(big.Int).SetString(ds.GetByName(valField), 10)
|
||||||
|
bnVal, _ := new(big.Int).SetString(val, 10)
|
||||||
|
bnNewVal := bnOldVal.Add(bnOldVal, bnVal)
|
||||||
|
updateKv = append(updateKv, [][]string{{valField, bnNewVal.String()}}...)
|
||||||
|
|
||||||
err1, _, _ := f5.GetGoStyleDb().NewUpdate(
|
err1, _, _ := f5.GetGoStyleDb().NewUpdate(
|
||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
"t_vip_user",
|
"t_vip_user",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user