1
This commit is contained in:
parent
d2410ae07f
commit
1ffa5bda37
@ -112,8 +112,7 @@ func NftExists(netId int32, contractAddress string, tokenId string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NftUpdateLock(netId int32, contractAddress string, tokenId string,
|
func NftUpdateLock(netId int32, contractAddress string, tokenId string,
|
||||||
lockIdx int64, lockAddress string, lockSender string) bool {
|
lockIdx int64, lockAddress string, lockSender string, lockTime int32) bool {
|
||||||
nowTime := f5.GetApp().GetRealSeconds()
|
|
||||||
result := false
|
result := false
|
||||||
f5.GetGoStyleDb().UpsertEx(
|
f5.GetGoStyleDb().UpsertEx(
|
||||||
constant.BCNFT_DB,
|
constant.BCNFT_DB,
|
||||||
@ -127,7 +126,7 @@ func NftUpdateLock(netId int32, contractAddress string, tokenId string,
|
|||||||
{"last_lock_idx", q5.ToString(lockIdx)},
|
{"last_lock_idx", q5.ToString(lockIdx)},
|
||||||
{"last_lock_address", lockAddress},
|
{"last_lock_address", lockAddress},
|
||||||
{"last_lock_sender", lockSender},
|
{"last_lock_sender", lockSender},
|
||||||
{"last_lock_time", q5.ToString(nowTime)},
|
{"last_lock_time", q5.ToString(lockTime)},
|
||||||
},
|
},
|
||||||
[][]string {},
|
[][]string {},
|
||||||
func (err error, lastInsertId int64, rowsAffected int64) {
|
func (err error, lastInsertId int64, rowsAffected int64) {
|
||||||
|
@ -67,6 +67,7 @@ func (this* nftLock) repair(ds *f5.DataSet) bool {
|
|||||||
idx := q5.ToInt64(ds.GetByName("idx"))
|
idx := q5.ToInt64(ds.GetByName("idx"))
|
||||||
lockTo := ds.GetByName("lock_to")
|
lockTo := ds.GetByName("lock_to")
|
||||||
lockSender := ds.GetByName("lock_sender")
|
lockSender := ds.GetByName("lock_sender")
|
||||||
|
createTime := q5.ToInt32(ds.GetByName("createtime"))
|
||||||
if nftSyncStatus == 0 && lockTo != "" {
|
if nftSyncStatus == 0 && lockTo != "" {
|
||||||
p := new(lockReturnValues)
|
p := new(lockReturnValues)
|
||||||
if q5.DecodeJson(ds.GetByName("return_values"), p) == nil {
|
if q5.DecodeJson(ds.GetByName("return_values"), p) == nil {
|
||||||
@ -74,7 +75,7 @@ func (this* nftLock) repair(ds *f5.DataSet) bool {
|
|||||||
contractAddress := strings.ToLower(p.Nft)
|
contractAddress := strings.ToLower(p.Nft)
|
||||||
tokenId := val
|
tokenId := val
|
||||||
if service.NftExists(netId, contractAddress, tokenId) {
|
if service.NftExists(netId, contractAddress, tokenId) {
|
||||||
service.NftUpdateLock(netId, contractAddress, tokenId, idx, lockTo, lockSender)
|
service.NftUpdateLock(netId, contractAddress, tokenId, idx, lockTo, lockSender, createTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user