From a45233ee8bd13b0f17b8641b2a1998c87ea480da Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 18 Sep 2024 19:06:16 +0800 Subject: [PATCH] 1 --- server/light_backtask/service/vip.go | 28 ++++++++++++++++++++++++++++ third_party/f5 | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/server/light_backtask/service/vip.go b/server/light_backtask/service/vip.go index 0e50cfcf..7e541a4a 100644 --- a/server/light_backtask/service/vip.go +++ b/server/light_backtask/service/vip.go @@ -1,7 +1,35 @@ package service +import ( + "f5" + "sync" + "main/constant" +) + type vip struct { + lock sync.Mutex } func (this *vip) init() () { } + +func (this *vip) Add(accountAddress string, val string, valField string, idxField string) bool { + this.lock.Lock() + defer this.lock.Unlock() + + err, ds := f5.GetGoStyleDb().NewOrmSelect( + constant.BCNFT_DB, + "t_vip_user", + [][]string { + {"address", accountAddress}, + }) + if err != nil { + return false + } + if ds.Next() { + + } else { + + } + return false +} diff --git a/third_party/f5 b/third_party/f5 index f3c6bd34..fe1b7e21 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit f3c6bd34599966b9d3724d3eb7f0703cdf0383bd +Subproject commit fe1b7e21eb37d5494ccf32347ff368a1f011ac02