From bfc9ff369c361b97321e7f098870300ac102f2db Mon Sep 17 00:00:00 2001 From: dy Date: Tue, 26 Dec 2023 16:20:59 +0800 Subject: [PATCH] =?UTF-8?q?fix=E5=85=83=E6=97=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/yuandan/ApiDMRec.ts | 2 +- .../protocols/event/yuandan/PtlDMRec.ts | 1 - .../protocols/event/yuandan/PtlZLRec.ts | 2 +- src/shared/protocols/serviceProto.ts | 32 ++++++++++++++----- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/api_s2c/event/yuandan/ApiDMRec.ts b/src/api_s2c/event/yuandan/ApiDMRec.ts index 859b784..bcbec2f 100644 --- a/src/api_s2c/event/yuandan/ApiDMRec.ts +++ b/src/api_s2c/event/yuandan/ApiDMRec.ts @@ -23,7 +23,7 @@ export default async function (call: ApiCall) { await PlayerFun.cutNeed(call, _hd.data.gameneed); } - await PlayerFun.sendPrize(call, prize || []); + await PlayerFun.sendPrize(call, prize ? [prize] : []); await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { $inc: {[`gameNum`]: 1}, diff --git a/src/shared/protocols/event/yuandan/PtlDMRec.ts b/src/shared/protocols/event/yuandan/PtlDMRec.ts index c0a01c1..cd4111e 100644 --- a/src/shared/protocols/event/yuandan/PtlDMRec.ts +++ b/src/shared/protocols/event/yuandan/PtlDMRec.ts @@ -2,7 +2,6 @@ * 元旦达摩领奖 */ export type ReqDMRec = { - id: string, prize: { a: string, t: string, n: number } | null } diff --git a/src/shared/protocols/event/yuandan/PtlZLRec.ts b/src/shared/protocols/event/yuandan/PtlZLRec.ts index 6e2d21f..ef83032 100644 --- a/src/shared/protocols/event/yuandan/PtlZLRec.ts +++ b/src/shared/protocols/event/yuandan/PtlZLRec.ts @@ -4,7 +4,7 @@ */ export type ReqZLRec = { id: string, - dlz: string[] + dlz: { a: string, t: string, n: number }[] } export type ResZLRec = { diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index cb14595..41a4fae 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -11403,13 +11403,6 @@ export const serviceProto: ServiceProto = { "properties": [ { "id": 0, - "name": "id", - "type": { - "type": "String" - } - }, - { - "id": 1, "name": "prize", "type": { "type": "Union", @@ -11537,7 +11530,30 @@ export const serviceProto: ServiceProto = { "type": { "type": "Array", "elementType": { - "type": "String" + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "a", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "t", + "type": { + "type": "String" + } + }, + { + "id": 2, + "name": "n", + "type": { + "type": "Number" + } + } + ] } } }