1
This commit is contained in:
parent
a45233ee8b
commit
15b20c0b89
@ -1,6 +1,7 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"q5"
|
||||||
"f5"
|
"f5"
|
||||||
"sync"
|
"sync"
|
||||||
"main/constant"
|
"main/constant"
|
||||||
@ -13,7 +14,7 @@ type vip struct {
|
|||||||
func (this *vip) init() () {
|
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()
|
this.lock.Lock()
|
||||||
defer this.lock.Unlock()
|
defer this.lock.Unlock()
|
||||||
|
|
||||||
@ -26,10 +27,23 @@ func (this *vip) Add(accountAddress string, val string, valField string, idxFiel
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
nowTime := f5.GetApp().GetRealSeconds()
|
||||||
if ds.Next() {
|
if ds.Next() {
|
||||||
|
|
||||||
} else {
|
} 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
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user