Merge remote-tracking branch 'origin/bugfix' into dev
This commit is contained in:
commit
52a112085b
@ -264,12 +264,16 @@ export abstract class Rank {
|
|||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
if(ghid.length > 0){
|
if(ghid.length > 0){
|
||||||
(await G.mongodb.collection("gonghui").find(
|
let ghinfo = await G.mongodb.collection("gonghui").find(
|
||||||
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
{ _id: { $in: ghid } }, { projection: { name: 1 } }
|
||||||
)).forEach(item => {
|
).toArray();
|
||||||
|
ghinfo.forEach(item => {
|
||||||
let index = res.findIndex(x => x.idKey == item._id.toHexString());
|
let index = res.findIndex(x => x.idKey == item._id.toHexString());
|
||||||
res[index].data.player.ghName = item.name;
|
res[index].data.player = {
|
||||||
this.db.updateOne({ idKey: item._id.toHexString(), type: this.getType() }, { $set: { "data.player.ghName": item.name } });
|
ghName: item.name,
|
||||||
|
ghId: item._id.toHexString(),
|
||||||
|
};
|
||||||
|
this.db.updateOne({ idKey: item._id.toHexString(), type: this.getType() }, { $set: { "data.player": res[index].data.player } });
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user