1
This commit is contained in:
parent
cdaa601fc8
commit
80e76e23da
@ -149,6 +149,7 @@ CREATE TABLE `t_erc721_refresh` (
|
||||
`contract_name` varchar(60) NOT NULL DEFAULT '' COMMENT 'contract_name',
|
||||
`token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id',
|
||||
`status` int(11) NOT NULL DEFAULT '0' COMMENT '0: dirty',
|
||||
`refresh_count` bigint NOT NULL DEFAULT '0' COMMENT 'refresh_count',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`),
|
||||
|
@ -113,7 +113,9 @@ class Erc721Refresher extends BaseService {
|
||||
],
|
||||
[
|
||||
['owner_address', bcutils.toNormalAddress(newOwner)],
|
||||
['confirm_count', this.nftDb['confirm_count'] + 1],
|
||||
['confirm_count', () => {
|
||||
return 'confirm_count + 1';
|
||||
}],
|
||||
['confirm_block_number', blockNumber]
|
||||
]);
|
||||
if (err) {
|
||||
@ -127,6 +129,20 @@ class Erc721Refresher extends BaseService {
|
||||
return true;
|
||||
}
|
||||
|
||||
async update(row, fields) {
|
||||
const {err} = await this.conn.update(
|
||||
't_erc721_refresh',
|
||||
[
|
||||
['idx', row['idx']],
|
||||
['net_id', row['net_id']],
|
||||
['token_id', row['token_id']],
|
||||
['contract_address', row['contract_address']],
|
||||
['refresh_count', row['refresh_count']],
|
||||
],
|
||||
fields,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = Erc721Refresher;
|
||||
|
Loading…
x
Reference in New Issue
Block a user