Merge branch 'feature/yuandan' into dev

This commit is contained in:
dy 2023-12-26 19:50:09 +08:00
commit 9ee67b5193
6 changed files with 23 additions and 9 deletions

View File

@ -23,7 +23,9 @@ export default async function (call: ApiCall<ReqDMRec, ResDMRec>) {
await PlayerFun.cutNeed(call, _hd.data.gameneed); 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}`}, { await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, {
$inc: {[`gameNum`]: 1}, $inc: {[`gameNum`]: 1},

View File

@ -27,10 +27,10 @@ export default async function (call: ApiCall<ReqDZRec, ResDZRec>) {
await PlayerFun.sendPrize(call, prize); await PlayerFun.sendPrize(call, prize);
await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { 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}) }, {upsert: true})
call.succ({}) call.succ({[gift.id]: prize})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['yuandan']);
} }

View File

@ -30,10 +30,10 @@ export default async function (call: ApiCall<ReqZLRec, ResZLRec>) {
await PlayerFun.sendPrize(call, prize); await PlayerFun.sendPrize(call, prize);
await G.mongodb.cEvent(`yuandan${_hd.hdid}`).updateOne({uid: call.uid, type: `yuandan${_hd.hdid}`}, { 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}) }, {upsert: true})
call.succ({}) call.succ({[call.req.id]: prize})
HongDianChange.sendChangeKey(call.uid, ['yuandan']); HongDianChange.sendChangeKey(call.uid, ['yuandan']);
} }

View File

@ -7,5 +7,5 @@ export type ReqDZRec = {
} }
export type ResDZRec = { export type ResDZRec = {
[k: string]: any;
} }

View File

@ -8,5 +8,5 @@ export type ReqZLRec = {
} }
export type ResZLRec = { export type ResZLRec = {
[k: string]: any;
} }

View File

@ -11497,7 +11497,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
] ]
}, },
"event/yuandan/PtlDZRec/ResDZRec": { "event/yuandan/PtlDZRec/ResDZRec": {
"type": "Interface" "type": "Interface",
"indexSignature": {
"keyType": "String",
"type": {
"type": "Any"
}
}
}, },
"event/yuandan/PtlExchange/ReqExchange": { "event/yuandan/PtlExchange/ReqExchange": {
"type": "Interface", "type": "Interface",
@ -11593,7 +11599,13 @@ export const serviceProto: ServiceProto<ServiceType> = {
] ]
}, },
"event/yuandan/PtlZLRec/ResZLRec": { "event/yuandan/PtlZLRec/ResZLRec": {
"type": "Interface" "type": "Interface",
"indexSignature": {
"keyType": "String",
"type": {
"type": "Any"
}
}
}, },
"event/yuedujijin/PtlOpen/ReqOpen": { "event/yuedujijin/PtlOpen/ReqOpen": {
"type": "Interface", "type": "Interface",