1
This commit is contained in:
parent
560bc927ab
commit
7a77de53db
@ -33,10 +33,8 @@ class Present extends BaseService {
|
|||||||
async processList(name, list) {
|
async processList(name, list) {
|
||||||
for (let i in list){
|
for (let i in list){
|
||||||
const presentMeta = list[i];
|
const presentMeta = list[i];
|
||||||
console.log(presentMeta);
|
|
||||||
const randItem = presentMeta.randItem();
|
const randItem = presentMeta.randItem();
|
||||||
if (randItem) {
|
if (randItem) {
|
||||||
console.log(11111);
|
|
||||||
const itemId = randItem['itemId'];
|
const itemId = randItem['itemId'];
|
||||||
const tokenType = randItem['tokenType'];
|
const tokenType = randItem['tokenType'];
|
||||||
for (let ii = 0; ii < presentMeta.getCount(); ++ii) {
|
for (let ii = 0; ii < presentMeta.getCount(); ++ii) {
|
||||||
@ -62,24 +60,26 @@ class Present extends BaseService {
|
|||||||
1,
|
1,
|
||||||
idx
|
idx
|
||||||
);
|
);
|
||||||
console.log(tokenId, presentMeta);
|
const fieldsList = [
|
||||||
|
['bc_mint_tokenid', tokenId],
|
||||||
|
['batch_id', name],
|
||||||
|
['row_id', presentMeta['id']],
|
||||||
|
['seq_id', seqId],
|
||||||
|
['account', bcutils.toNormalAddress(presentMeta['account'])],
|
||||||
|
['game_id', this.gameId],
|
||||||
|
|
||||||
|
['bc_mint_itemid', itemId],
|
||||||
|
['bc_mint_token_type', tokenType],
|
||||||
|
['bc_mint_tags', presentMeta.getTags()],
|
||||||
|
|
||||||
|
['createtime', this.nowTime],
|
||||||
|
['modifytime', this.nowTime]
|
||||||
|
];
|
||||||
|
|
||||||
|
log.info('insert t_present ', utils.jsonEncode(fieldsList));
|
||||||
const {err} = await this.conn.insert(
|
const {err} = await this.conn.insert(
|
||||||
't_present',
|
't_present',
|
||||||
[
|
fieldsList
|
||||||
['bc_mint_tokenid', tokenId],
|
|
||||||
['batch_id', name],
|
|
||||||
['row_id', presentMeta['id']],
|
|
||||||
['seq_id', seqId],
|
|
||||||
['account', bcutils.toNormalAddress(presentMeta['account'])],
|
|
||||||
['game_id', this.gameId],
|
|
||||||
|
|
||||||
['bc_mint_itemid', itemId],
|
|
||||||
['bc_mint_token_type', tokenType],
|
|
||||||
['bc_mint_tags', presentMeta.getTags()],
|
|
||||||
|
|
||||||
['createtime', this.nowTime],
|
|
||||||
['modifytime', this.nowTime]
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user