diff --git a/server/light_backtask/service/vip.go b/server/light_backtask/service/vip.go index 7e541a4a..b92d9dfa 100644 --- a/server/light_backtask/service/vip.go +++ b/server/light_backtask/service/vip.go @@ -1,6 +1,7 @@ package service import ( + "q5" "f5" "sync" "main/constant" @@ -13,7 +14,7 @@ type vip struct { func (this *vip) init() () { } -func (this *vip) Add(accountAddress string, val string, valField string, idxField string) bool { +func (this *vip) Add(accountAddress string, val string, idx int64, valField string, idxField string) bool { this.lock.Lock() defer this.lock.Unlock() @@ -26,10 +27,23 @@ func (this *vip) Add(accountAddress string, val string, valField string, idxFiel if err != nil { return false } + nowTime := f5.GetApp().GetRealSeconds() if ds.Next() { } else { - + err1, _, _ := f5.GetGoStyleDb().NewInsert( + constant.BCNFT_DB, + "t_vip_user", + [][]string { + {"account_address", accountAddress}, + {valField, val}, + {idxField, q5.ToString(idx)}, + {"createtime", q5.ToString(nowTime)}, + {"modifytime", q5.ToString(nowTime)}, + }) + if err1 != nil { + return false + } } return false }