From 26be80a811a9a231e306e5c7b894f6fa02733544 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 24 Sep 2024 16:58:35 +0800 Subject: [PATCH] 1 --- server/light_backtask/service/vip.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/light_backtask/service/vip.go b/server/light_backtask/service/vip.go index 2d79c072..44e3ea23 100644 --- a/server/light_backtask/service/vip.go +++ b/server/light_backtask/service/vip.go @@ -43,7 +43,6 @@ func (this *vip) Add(accountAddress string, val string, idx int64, valField stri } nowTime := f5.GetApp().GetRealSeconds() updateKv := [][]string { - {valField, val}, {idxField, q5.ToString(idx)}, {"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 { 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( constant.BCNFT_DB, "t_vip_user",