From f50f6de93329ab2c1fdc85268f46940dfccde7bb Mon Sep 17 00:00:00 2001 From: dy Date: Tue, 26 Dec 2023 19:49:46 +0800 Subject: [PATCH] yuandan --- src/api_s2c/event/yuandan/ApiDMRec.ts | 4 +++- src/api_s2c/event/yuandan/ApiDZRec.ts | 4 ++-- src/api_s2c/event/yuandan/ApiZLRec.ts | 4 ++-- src/shared/protocols/event/yuandan/PtlDZRec.ts | 2 +- src/shared/protocols/event/yuandan/PtlZLRec.ts | 2 +- src/shared/protocols/serviceProto.ts | 16 ++++++++++++++-- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/api_s2c/event/yuandan/ApiDMRec.ts b/src/api_s2c/event/yuandan/ApiDMRec.ts index 758a4f6..b0ddea0 100644 --- a/src/api_s2c/event/yuandan/ApiDMRec.ts +++ b/src/api_s2c/event/yuandan/ApiDMRec.ts @@ -23,7 +23,9 @@ export default async function (call: ApiCall) { await PlayerFun.cutNeed(call, _hd.data.gameneed); } - await PlayerFun.sendPrize(call, prize ? [prize] : []); + if (prize){ + await PlayerFun.sendPrize(call, [prize] ); + } await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { $inc: {[`gameNum`]: 1}, diff --git a/src/api_s2c/event/yuandan/ApiDZRec.ts b/src/api_s2c/event/yuandan/ApiDZRec.ts index a801b42..a2dd1b8 100644 --- a/src/api_s2c/event/yuandan/ApiDZRec.ts +++ b/src/api_s2c/event/yuandan/ApiDZRec.ts @@ -27,10 +27,10 @@ export default async function (call: ApiCall) { await PlayerFun.sendPrize(call, prize); await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { - $set: {[`gift.${gift.id}`]: JSON.stringify(prize)}, + $set: {[`gift.${gift.id}`]: prize}, }, {upsert: true}) - call.succ({}) + call.succ({[gift.id]: prize}) HongDianChange.sendChangeKey(call.uid, ['yuandan']); } diff --git a/src/api_s2c/event/yuandan/ApiZLRec.ts b/src/api_s2c/event/yuandan/ApiZLRec.ts index b810694..0a30022 100644 --- a/src/api_s2c/event/yuandan/ApiZLRec.ts +++ b/src/api_s2c/event/yuandan/ApiZLRec.ts @@ -30,10 +30,10 @@ export default async function (call: ApiCall) { await PlayerFun.sendPrize(call, prize); await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { - $set: {[`qiandao.${call.req.id}`]: JSON.stringify(prize)}, + $set: {[`qiandao.${call.req.id}`]: prize}, }, {upsert: true}) - call.succ({}) + call.succ({[call.req.id]: prize}) HongDianChange.sendChangeKey(call.uid, ['yuandan']); } diff --git a/src/shared/protocols/event/yuandan/PtlDZRec.ts b/src/shared/protocols/event/yuandan/PtlDZRec.ts index 03db521..5d38184 100644 --- a/src/shared/protocols/event/yuandan/PtlDZRec.ts +++ b/src/shared/protocols/event/yuandan/PtlDZRec.ts @@ -7,5 +7,5 @@ export type ReqDZRec = { } export type ResDZRec = { - + [k: string]: any; } diff --git a/src/shared/protocols/event/yuandan/PtlZLRec.ts b/src/shared/protocols/event/yuandan/PtlZLRec.ts index ef83032..a15b7d7 100644 --- a/src/shared/protocols/event/yuandan/PtlZLRec.ts +++ b/src/shared/protocols/event/yuandan/PtlZLRec.ts @@ -8,5 +8,5 @@ export type ReqZLRec = { } export type ResZLRec = { - + [k: string]: any; } diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index b8e538b..9dd6606 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -11497,7 +11497,13 @@ export const serviceProto: ServiceProto = { ] }, "event/yuandan/PtlDZRec/ResDZRec": { - "type": "Interface" + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } }, "event/yuandan/PtlExchange/ReqExchange": { "type": "Interface", @@ -11593,7 +11599,13 @@ export const serviceProto: ServiceProto = { ] }, "event/yuandan/PtlZLRec/ResZLRec": { - "type": "Interface" + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } }, "event/yuedujijin/PtlOpen/ReqOpen": { "type": "Interface",