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,
|
||||
lockIdx int64, lockAddress string, lockSender string) bool {
|
||||
nowTime := f5.GetApp().GetRealSeconds()
|
||||
lockIdx int64, lockAddress string, lockSender string, lockTime int32) bool {
|
||||
result := false
|
||||
f5.GetGoStyleDb().UpsertEx(
|
||||
constant.BCNFT_DB,
|
||||
@ -127,7 +126,7 @@ func NftUpdateLock(netId int32, contractAddress string, tokenId string,
|
||||
{"last_lock_idx", q5.ToString(lockIdx)},
|
||||
{"last_lock_address", lockAddress},
|
||||
{"last_lock_sender", lockSender},
|
||||
{"last_lock_time", q5.ToString(nowTime)},
|
||||
{"last_lock_time", q5.ToString(lockTime)},
|
||||
},
|
||||
[][]string {},
|
||||
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"))
|
||||
lockTo := ds.GetByName("lock_to")
|
||||
lockSender := ds.GetByName("lock_sender")
|
||||
createTime := q5.ToInt32(ds.GetByName("createtime"))
|
||||
if nftSyncStatus == 0 && lockTo != "" {
|
||||
p := new(lockReturnValues)
|
||||
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)
|
||||
tokenId := val
|
||||
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