Compare commits

..

No commits in common. "c52f9b4b9ad6d6cab2d4fa75258d2c0cdb20dc46" and "8fe4e99ddc65a4b4e08b49b0c847ec56ae648b4d" have entirely different histories.

2 changed files with 6 additions and 8 deletions

View File

@ -119,13 +119,13 @@ export default class HQJGFun {
static today(hdinfo: ReqAddHuoDong) { static today(hdinfo: ReqAddHuoDong) {
/** /**
* 1 * 1
*/ */
return PublicShared.getDiff(hdinfo.stime, G.time) return PublicShared.getDiff(hdinfo.stime, G.time)
} }
/** /**
* *
*/ */
static async getRankList(hdid: number) { static async getRankList(hdid: number) {
let uids = await G.mongodb.collection("event").find( let uids = await G.mongodb.collection("event").find(
{ type: this.dataType(hdid), "bossres.maxdps": { $gt: 0 } }, { type: this.dataType(hdid), "bossres.maxdps": { $gt: 0 } },
@ -206,11 +206,10 @@ export default class HQJGFun {
/** 设置我的数据 */ /** 设置我的数据 */
static async setMyData(uid: string, hdid: number, update: { [k in keyof Partial<PlayerData>]: PlayerData[k] }) { static async setMyData(uid: string, hdid: number, update: { [k in keyof Partial<PlayerData>]: PlayerData[k] }) {
let res = await G.mongodb.cEvent(this.dataType(hdid)).updateOne( let res = await G.mongodb.cEvent(this.dataType(hdid)).updateOne(
{ uid: uid, type: this.dataType(hdid) }, { $set: update }, { upsert: true } { uid: uid, type: this.dataType(hdid) }, { $set: update }
); );
if (res.upsertedCount == 1) { if (res.modifiedCount <= 0) {
console.log("===>", uid, hdid, update);
await G.mongodb.cEvent(this.dataType(hdid)).updateOne( await G.mongodb.cEvent(this.dataType(hdid)).updateOne(
{ uid: uid, type: this.dataType(hdid) }, { $set: Object.assign(this.defaultData, update) } { uid: uid, type: this.dataType(hdid) }, { $set: Object.assign(this.defaultData, update) }
); );
@ -278,7 +277,7 @@ export default class HQJGFun {
/** /**
* *
*/ */
static async endDpsRankPrize(time: number) { static async endDpsRankPrize(time: number) {
console.log( console.log(
"黄旗酒馆 最大伤害排行奖励结算 开始执行。。。" "黄旗酒馆 最大伤害排行奖励结算 开始执行。。。"
@ -434,7 +433,7 @@ export default class HQJGFun {
return return
} }
let mydata = await this.getMydata(call, hd); let mydata = await this.getMydata(call);
if (!mydata.giftbuy[gift.id]) { if (!mydata.giftbuy[gift.id]) {
mydata.giftbuy[gift.id] = { num: 0, select: [] }; mydata.giftbuy[gift.id] = { num: 0, select: [] };
} }

View File

@ -124,7 +124,6 @@ export class PublicShared {
else if (atn.a == 'item') return G.gc.item[atn.t]; else if (atn.a == 'item') return G.gc.item[atn.t];
else if (atn.a == 'hero') return G.gc.hero[atn.t]; else if (atn.a == 'hero') return G.gc.hero[atn.t];
else if (atn.a == 'equip') return G.gc.equip[atn.t]; else if (atn.a == 'equip') return G.gc.equip[atn.t];
else if (atn.a == 'heroskin') return G.gc.heroSkin[atn.t];
return null; return null;
} }