From 7488802fd01de2993802f4b34a863ff54f9621d7 Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 20 Dec 2023 13:56:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?revert=20=E6=8E=A8=E9=80=81=E7=A4=BC?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/jiuba/ApiLottery.ts | 5 + src/api_s2c/pushgift/ApiOpen.ts | 29 ++++ src/jsonType.ts | 19 +++ src/module/collection_pushgift.ts | 13 ++ src/module/mongodb.ts | 2 + src/public/fight.ts | 20 ++- src/public/player.ts | 64 +++++--- src/public/pushgift.ts | 155 ++++++++++++++++++ .../protocols/msg_s2c/MsgPushGiftChange.ts | 1 + src/shared/protocols/pushgift/PtlOpen.ts | 5 + 10 files changed, 289 insertions(+), 24 deletions(-) create mode 100644 src/api_s2c/pushgift/ApiOpen.ts create mode 100644 src/module/collection_pushgift.ts create mode 100644 src/public/pushgift.ts create mode 100644 src/shared/protocols/msg_s2c/MsgPushGiftChange.ts create mode 100644 src/shared/protocols/pushgift/PtlOpen.ts diff --git a/src/api_s2c/jiuba/ApiLottery.ts b/src/api_s2c/jiuba/ApiLottery.ts index 968cd79..89266e0 100644 --- a/src/api_s2c/jiuba/ApiLottery.ts +++ b/src/api_s2c/jiuba/ApiLottery.ts @@ -9,6 +9,7 @@ import {ReqLottery, ResLottery} from "../../shared/protocols/jiuba/PtlLottery"; import {PublicShared} from '../../shared/public/public'; import {HongDianChange} from '../hongdian/fun'; import {RankKfjs} from "../../public/rank/rank_kfjs"; +import {PushGiftFun} from "../../public/pushgift"; export default async function (call: ApiCall) { @@ -142,4 +143,8 @@ export default async function (call: ApiCall) { valArr: [await rankKfjs.getRankScore(call.uid) + call.req.type] }); + // 十连抽推送礼包 + if (call.req.type == 10) { + PushGiftFun.chkRecruitGift(call.uid) + } } \ No newline at end of file diff --git a/src/api_s2c/pushgift/ApiOpen.ts b/src/api_s2c/pushgift/ApiOpen.ts new file mode 100644 index 0000000..58d85b2 --- /dev/null +++ b/src/api_s2c/pushgift/ApiOpen.ts @@ -0,0 +1,29 @@ +import {ApiCall} from "tsrpc"; +import {ReqOpen, ResOpen} from "../../shared/protocols/pushgift/PtlOpen"; +import {PushGiftFun} from "../../public/pushgift"; +import {Gift} from "../../module/collection_pushgift"; + +export default async function (call: ApiCall) { + let res: ResOpen = {gifts: []}; + + // 过滤过期的礼包 和购买完毕的礼包 + (await PushGiftFun.getGift(call.uid)).forEach((gift) => { + if (gift.passTime > G.time && chkBuyNum(gift.id, gift)) { + res.gifts.push(gift) + } + }) + + call.succ(res) +} + +function chkBuyNum(gift_id: string, gift_info: Gift) { + let conf = G.gc.tuisonglibao[gift_id]; + for (let i = 0; i < conf.payId.length; i++) { + let pay = G.gc.pay[conf.payId[i]]; + if (pay.buys > 0 && gift_info.buy[i] < pay.buys) { + return true + } + } + + return false +} \ No newline at end of file diff --git a/src/jsonType.ts b/src/jsonType.ts index 43654a4..8788f60 100644 --- a/src/jsonType.ts +++ b/src/jsonType.ts @@ -1773,6 +1773,24 @@ type gc_yuyuemail = { 'prize': { "a": string, "t": string, "n": number, [x: string]: any }[] }; +type gc_push_gift = { + [k: string]: { + /**礼包id*/ + id: number + /**礼包类型*/ + type: number + /**礼包参数*/ + num: any[] + /**购买id*/ + payId: string[] + /**持续时间*/ + time: number + /**冷却时间*/ + displayCD: number + /**显示返利比*/ + scale: number + } +} type gcType = { [key: string]: any @@ -1922,6 +1940,7 @@ type gcType = { kfcb_content: gc_kfcb_content kfcb_prize: gc_kfcb_prize yuyuemail: gc_yuyuemail + tuisonglibao: gc_push_gift } diff --git a/src/module/collection_pushgift.ts b/src/module/collection_pushgift.ts new file mode 100644 index 0000000..c62fff0 --- /dev/null +++ b/src/module/collection_pushgift.ts @@ -0,0 +1,13 @@ +import {ObjectId} from "mongodb"; +import {ResOpen} from "../shared/protocols/pushgift/PtlOpen"; + +export type Gift = { + id: string + uid: string + buy: number[] + ctime: number + passTime: number + ext_data: { [key: string]: any } +} + +export type CollectionPushGift = Gift & { _id: ObjectId }; \ No newline at end of file diff --git a/src/module/mongodb.ts b/src/module/mongodb.ts index f912ad7..5d8c8ac 100644 --- a/src/module/mongodb.ts +++ b/src/module/mongodb.ts @@ -59,6 +59,7 @@ import {CollectionPlayerBehavior} from "./collection_player_behavior"; import {CollectionRmbuse} from "./collection_rmbuse"; import {CollectionFightLog} from "./collection_fightLog"; import {CollectionShop} from "./collection_shop"; +import {CollectionPushGift} from "./collection_pushgift"; export type MongodbCollections = { user: CollectionUser; @@ -131,4 +132,5 @@ export type MongodbCollections = { rmbuse: CollectionRmbuse fightLog: CollectionFightLog shop: CollectionShop + pushgift:CollectionPushGift }; \ No newline at end of file diff --git a/src/public/fight.ts b/src/public/fight.ts index 202369c..c13c029 100644 --- a/src/public/fight.ts +++ b/src/public/fight.ts @@ -9,6 +9,7 @@ import {HeroFun} from './hero'; import {UserFun} from './user'; import {re, string} from "mathjs"; import {getGud} from './gud'; +import {PushGiftFun} from "./pushgift"; type fightType = 'tanxian' | 'pata' | 'jjc' | 'gbtx' | 'qjzzd' | 'meirishilian' | 'wzrycross'; @@ -86,9 +87,16 @@ export class FightFun { /**挑战竞技场 */ static async fightJJc(call: ApiCall, rankInfo: rankInfo) { - if (rankInfo.player.uid.indexOf('npc_') != -1) return await this.fightNpc(call, G.gc.jjc_npc[rankInfo.player.uid].npcId, 'jjc', await this.getPlayerFightData(call.conn.uid)); - return this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]); + + let result = this.fight([await this.getPlayerFightData(call.conn.uid), await this.getPlayerFightData(rankInfo.player.uid)]); + + // 竞技场 战败触发推送礼包 + if (result.winSide != 0) { + PushGiftFun.chkLoseGift(call.uid) + } + + return result } /**挑战npc */ @@ -106,7 +114,13 @@ export class FightFun { let npc = formatNpcData(npcId); - return this.fight([my, npc], 30, 'pve'); + let result = this.fight([my, npc], 30, 'pve'); + + // 主线 爬塔 战败触发推送礼包 + if (result.winSide != 0 && ["tanxian", "pata"].includes(type)) { + PushGiftFun.chkLoseGift(data[0].player.uid) + } + return result } /** diff --git a/src/public/player.ts b/src/public/player.ts index d8322dd..27d8ddc 100644 --- a/src/public/player.ts +++ b/src/public/player.ts @@ -14,9 +14,10 @@ import {PublicShared} from '../shared/public/public'; import {HeroFun} from './hero'; import {ShiwuFun} from './shiwu'; import {UserFun} from './user'; -import { getItemByItemId, getItemNum } from './item'; -import { getGud, setGud } from './gud'; +import {getItemByItemId, getItemNum} from './item'; +import {getGud, setGud} from './gud'; import {addGameLog} from "../gameLog"; +import {PushGiftFun} from "./pushgift"; export type call = { @@ -35,7 +36,7 @@ export type call = { }; service: { name: string }; addEventMsg: ApiCall['addEventMsg']; - req: { } + req: {} }; export class PlayerFun { @@ -66,6 +67,8 @@ export class PlayerFun { if (has < atn.n) { if (err) { + // 消耗不足 触发推送礼包 + PushGiftFun.chkItemGift(call.uid, atn) throw new TsrpcError('', {code: -104, atn: atn}); } else { return {isOk: false, atn: atn}; @@ -143,15 +146,15 @@ export class PlayerFun { shiwu.length > 0 && this.addShiwu(call, shiwu), peijian.length > 0 && this.addPeijian(call, peijian) ]); - + return prizeList; }; //attr里的指定字段的值,不能小于0 - static fixAttrLteZero(t:string, val:number){ - if(['jinbi','rmbmoney','payExp','nexp'].includes(t) && val < 0){ + static fixAttrLteZero(t: string, val: number) { + if (['jinbi', 'rmbmoney', 'payExp', 'nexp'].includes(t) && val < 0) { return 0 - }else{ + } else { return val; } } @@ -189,6 +192,16 @@ export class PlayerFun { // 修改属性应在相关奖励领取之前,否则奖励内获取的用户数据是旧数据 // await this.changeAttr(call.conn.uid, change); call.addEventMsg('msg_s2c/PlayerChange', change); + + // 等级改变 触发推送礼包 + if (change["lv"]) { + PushGiftFun.chkLvGift(call.uid, change["lv"]) + } + // 关卡改变 触发推送礼包 + if (change["mapId"]) { + PushGiftFun.chkLevelGift(call.uid, change["mapId"]) + } + } static async changeAttrLog(uid: string, change, atn, before) { @@ -207,9 +220,9 @@ export class PlayerFun { static async changeAttr(uid: string, change: Partial) { //for (let k in change) { - //G.redis.set('user', uid, k as any, change[k]); + //G.redis.set('user', uid, k as any, change[k]); //} - setGud(uid,change); + setGud(uid, change); G.mongodb.collection('user').updateOne({uid: uid}, {$set: change}); @@ -290,7 +303,11 @@ export class PlayerFun { G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options); call.addEventMsg('msg_s2c/ItemChange', atn.t, data); - addGameLog(call.uid, "_itemChange", {"additem":1}, {"filter": upObj.filter, "update": upObj.update, "options": upObj.options}) + addGameLog(call.uid, "_itemChange", {"additem": 1}, { + "filter": upObj.filter, + "update": upObj.update, + "options": upObj.options + }) } else { if (item.num + atn.n <= 0) { await Promise.all([ @@ -302,13 +319,13 @@ export class PlayerFun { //await G.redis.del('item', call.uid, atn.t); //await G.mongodb.collection('item').deleteOne({uid: call.uid, itemId: atn.t}); call.addEventMsg('msg_s2c/ItemChange', atn.t, {num: 0}); - addGameLog(call.uid, "_itemChange",{"delitem":1}, {"itemId": atn.t}) + addGameLog(call.uid, "_itemChange", {"delitem": 1}, {"itemId": atn.t}) } else { await Promise.all([ ////去掉item Redis相关 //G.redis.set('item', call.uid, atn.t, 'lastTime', upObj.update.$set.lastTime), //G.redis.numIncrBy('item', call.uid, atn.t, 'num', atn.n), - + G.mongodb.collection('item').updateOne(upObj.filter, upObj.update, upObj.options) ]); // await G.redis.set('item', call.uid, atn.t, 'lastTime', upObj.update.$set.lastTime); @@ -318,7 +335,12 @@ export class PlayerFun { num: item.num + atn.n, lastTime: upObj.update.$set.lastTime }); - addGameLog(call.uid, "_itemChange",{"attritem":1}, {"filter": upObj.filter, "update": upObj.update, "options": upObj.options,newNum:item.num + atn.n}) + addGameLog(call.uid, "_itemChange", {"attritem": 1}, { + "filter": upObj.filter, + "update": upObj.update, + "options": upObj.options, + newNum: item.num + atn.n + }) } } } @@ -344,7 +366,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('equip').insertMany(insertData); - addGameLog(call.uid, "_addEquip",{}, insertData) + addGameLog(call.uid, "_addEquip", {}, insertData) insertData.forEach((v, key) => { let id = result.insertedIds[key].toHexString(); @@ -391,7 +413,7 @@ export class PlayerFun { G.mongodb.collection('equip').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/EquipChange', _id, {num: 0}); - addGameLog(call.uid, "_cutEquip",{}, {_id:_id}) + addGameLog(call.uid, "_cutEquip", {}, {_id: _id}) } } @@ -419,7 +441,7 @@ export class PlayerFun { }); let result = await G.mongodb.collection('hero').insertMany(insertData); - addGameLog(call.uid, "_addHero",{}, insertData) + addGameLog(call.uid, "_addHero", {}, insertData) for (let key = 0; key < insertData.length; key++) { let v = insertData[key] @@ -474,7 +496,7 @@ export class PlayerFun { G.redis.del('hero', call.uid, _id); G.mongodb.collection('hero').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/HeroChange', _id, {num: 0}); - addGameLog(call.uid, "_cutHero",{}, {_id:_id}) + addGameLog(call.uid, "_cutHero", {}, {_id: _id}) } } @@ -505,7 +527,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('shiwu').insertMany(insertData); - addGameLog(call.uid, "_addShiWu",{}, insertData) + addGameLog(call.uid, "_addShiWu", {}, insertData) insertData.forEach((v, key) => { let id = result.insertedIds[key].toHexString(); @@ -537,7 +559,7 @@ export class PlayerFun { // G.redis.del('shiwu', call.uid, _id); G.mongodb.collection('shiwu').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/ShiwuChange', _id, {num: 0}); - addGameLog(call.uid, "_cutShiwu",{}, {_id:_id}) + addGameLog(call.uid, "_cutShiwu", {}, {_id: _id}) } } @@ -559,7 +581,7 @@ export class PlayerFun { }).reduce((a, b) => a.concat(b)); let result = await G.mongodb.collection('peijian').insertMany(insertData); - addGameLog(call.uid, "_addPeiJian",{}, insertData) + addGameLog(call.uid, "_addPeiJian", {}, insertData) insertData.forEach((v, key) => { let {_id, uid, ...ops} = v; @@ -600,7 +622,7 @@ export class PlayerFun { G.redis.del('peijian', call.uid, _id); G.mongodb.collection('peijian').deleteOne({uid: call.uid, _id: new ObjectId(_id)}); call.addEventMsg('msg_s2c/PeijianChange', _id, {num: 0}); - addGameLog(call.uid, "_cutPeijian",{}, {_id:_id}) + addGameLog(call.uid, "_cutPeijian", {}, {_id: _id}) } } diff --git a/src/public/pushgift.ts b/src/public/pushgift.ts new file mode 100644 index 0000000..72fcfde --- /dev/null +++ b/src/public/pushgift.ts @@ -0,0 +1,155 @@ +import {PayFun} from "./pay"; + +const PushGiftType = { + LevelGift: 1, // 关卡推送 + ItemGift: 2, // 道具推送 + LoseGift: 3, // 战败推送 + RecruitGift: 4, // 十连推送 + LvGift: 5, // 等级推送 +} + +export class PushGiftFun { + + static async getGift(uid: string) { + // 查询所有礼包 + return (await G.mongodb.collection("pushgift").find({ + uid: uid + }).toArray()).map((i) => { + let {_id, ...gift} = i; + return gift + }) + } + + static async chkItemGift(uid: string, atn: atn) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.ItemGift && conf.num[0].a == atn.a && conf.num[0].t == atn.t) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLevelGift(uid: string, level: number) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LevelGift && conf.num[0] == level) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLvGift(uid: string, lv: number) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LevelGift && conf.num[0] == lv) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkLoseGift(uid: string) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.LoseGift) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async chkRecruitGift(uid: string) { + let gift_ids = []; + for (let id in G.gc.tuisonglibao) { + let conf = G.gc.tuisonglibao[id]; + if (conf.type == PushGiftType.RecruitGift) { + gift_ids.push(id); + } + } + if (gift_ids.length <= 0) { + return + } else { + this.pushGift(uid, gift_ids) + } + } + + static async pushGift(uid: string, gift_ids: string[]) { + let gifts = {}; + (await this.getGift(uid)).forEach(i => gifts[i.id] = i) + for (let gift_id of gift_ids) { + let conf = G.gc.tuisonglibao[gift_id]; + if (gifts[gift_id] && conf.displayCD > 0 && gifts[gift_id].ctime + conf.displayCD > G.time) { + continue + } + if (conf.type == PushGiftType.RecruitGift) { + if (gifts[gift_id]) { + if (gift_ids[gift_id].ext_data.num + 1 >= conf.num[0]) { + this.addGift(uid, gift_id, {num: 0}) + } else { + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift_id + }, {"$inc": {"ext_data.num": 1}}) + } + } else { + // 招募礼包不存在 初始化数据 记录招募次数 + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift_id + }, { + $set: { + ctime: 0, + passTime: 0, + ext_data: {num: 1}, + buy: conf.payId.map(() => 0), + } + }, {upsert: true}) + } + } else { + this.addGift(uid, gift_id, {}) + } + } + } + + static async addGift(uid: string, giftid: string, ext_data: { [key: string]: any }) { + let conf = G.gc.tuisonglibao[giftid]; + // 更新礼包 + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: giftid + }, { + $set: { + ctime: G.time, + ext_data: ext_data, + passTime: G.time + conf.time, + buy: conf.payId.map(() => 0), + } + }, {upsert: true}) + + // 删除购买记录 + PayFun.delPayLog(uid, ...conf.payId.map(i => { + return {payId: i, val: []} + })) + // 推送客户端消息 + G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", 1); + } +} \ No newline at end of file diff --git a/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts new file mode 100644 index 0000000..4c04b9b --- /dev/null +++ b/src/shared/protocols/msg_s2c/MsgPushGiftChange.ts @@ -0,0 +1 @@ +export type MsgPushGiftChange = 1; diff --git a/src/shared/protocols/pushgift/PtlOpen.ts b/src/shared/protocols/pushgift/PtlOpen.ts new file mode 100644 index 0000000..829c306 --- /dev/null +++ b/src/shared/protocols/pushgift/PtlOpen.ts @@ -0,0 +1,5 @@ +import {Gift} from "../../../module/collection_pushgift"; + +export type ReqOpen = {} + +export type ResOpen = { gifts: Gift[] } From 146f5a1daa193f8a0c342431098d291840af774a Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 20 Dec 2023 13:56:24 +0800 Subject: [PATCH 2/4] Revert "Revert "feat:"" This reverts commit ce5836be83cfd72acf26a6ef64d8681371257851. --- src/globalListener.ts | 2 ++ src/public/pushgift.ts | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/globalListener.ts b/src/globalListener.ts index 2c3aa37..a5a750f 100644 --- a/src/globalListener.ts +++ b/src/globalListener.ts @@ -17,6 +17,7 @@ import { PublicShared } from './shared/public/public'; import { setGud } from './public/gud'; import {checkResetBuyLog} from "./api_s2c/event/zhoumolibao/ApiOpen"; import {Christmasfun} from "./api_s2c/event/christmas/fun"; +import {PushGiftFun} from "./public/pushgift"; export type gEventType = { /**玩家断开连接 */ @@ -198,6 +199,7 @@ export function addListener() { { $inc: { payNum: conf.money } }, { upsert: true } ); + PushGiftFun.buy(player.uid, payId) // 推送礼包 }); G.on("FIRST_LOGIN_EVERY_DAY", (gud, lastTime, curTime) => { diff --git a/src/public/pushgift.ts b/src/public/pushgift.ts index 72fcfde..e003088 100644 --- a/src/public/pushgift.ts +++ b/src/public/pushgift.ts @@ -152,4 +152,22 @@ export class PushGiftFun { // 推送客户端消息 G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", 1); } + + static async buy(uid: string, payId: string) { + // 购买礼包 + let gift; + for (let gift_id in G.gc.tuisonglibao) { + gift = G.gc.tuisonglibao[gift_id]; + if (gift.payId.includes(payId)) break; + } + let index = gift.payId.indexOf(payId); + let info = await G.mongodb.collection("pushgift").findOne({ + uid: uid, id: gift.id.toString() + }) + if (info.passTime >= G.time) { + G.mongodb.collection("pushgift").updateOne({ + uid: uid, id: gift.id.toString() + }, {$inc: {[`buy.${index}`]: 1}}) + } + } } \ No newline at end of file From a113f4c461479e1baf347c656db3519add356faf Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 20 Dec 2023 13:56:45 +0800 Subject: [PATCH 3/4] Revert "Revert "feat:"" This reverts commit c282ece109dd987633b3aaf3da67ac226c05938e. --- src/public/fight.ts | 2 +- src/public/pushgift.ts | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/public/fight.ts b/src/public/fight.ts index c13c029..c2388b5 100644 --- a/src/public/fight.ts +++ b/src/public/fight.ts @@ -118,7 +118,7 @@ export class FightFun { // 主线 爬塔 战败触发推送礼包 if (result.winSide != 0 && ["tanxian", "pata"].includes(type)) { - PushGiftFun.chkLoseGift(data[0].player.uid) + PushGiftFun.chkLoseGift(call.uid) } return result } diff --git a/src/public/pushgift.ts b/src/public/pushgift.ts index e003088..22fb397 100644 --- a/src/public/pushgift.ts +++ b/src/public/pushgift.ts @@ -54,7 +54,7 @@ export class PushGiftFun { let gift_ids = []; for (let id in G.gc.tuisonglibao) { let conf = G.gc.tuisonglibao[id]; - if (conf.type == PushGiftType.LevelGift && conf.num[0] == lv) { + if (conf.type == PushGiftType.LvGift && conf.num[0] == lv) { gift_ids.push(id); } } @@ -157,17 +157,23 @@ export class PushGiftFun { // 购买礼包 let gift; for (let gift_id in G.gc.tuisonglibao) { - gift = G.gc.tuisonglibao[gift_id]; - if (gift.payId.includes(payId)) break; + let temp = G.gc.tuisonglibao[gift_id]; + if (temp.payId.includes(payId)) { + gift = temp; + break + } } + if (!gift) return; let index = gift.payId.indexOf(payId); let info = await G.mongodb.collection("pushgift").findOne({ uid: uid, id: gift.id.toString() }) if (info.passTime >= G.time) { - G.mongodb.collection("pushgift").updateOne({ + await G.mongodb.collection("pushgift").updateOne({ uid: uid, id: gift.id.toString() }, {$inc: {[`buy.${index}`]: 1}}) + // 推送客户端消息 + G.server.sendMsgByUid(uid, "msg_s2c/PushGiftChange", 1); } } } \ No newline at end of file From 105af9bbc7eb9e2877bc21bb388f59fc70cc18b2 Mon Sep 17 00:00:00 2001 From: dy Date: Wed, 20 Dec 2023 13:59:38 +0800 Subject: [PATCH 4/4] =?UTF-8?q?revert=20=E6=8E=A8=E9=80=81=E7=A4=BC?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/protocols/serviceProto.ts | 376 +++++++++++++++++---------- 1 file changed, 236 insertions(+), 140 deletions(-) diff --git a/src/shared/protocols/serviceProto.ts b/src/shared/protocols/serviceProto.ts index c60ab37..7dad19f 100644 --- a/src/shared/protocols/serviceProto.ts +++ b/src/shared/protocols/serviceProto.ts @@ -236,6 +236,7 @@ import { MsgPayResult } from './msg_s2c/MsgPayResult'; import { MsgPeijianChange } from './msg_s2c/MsgPeijianChange'; import { MsgPlayerChange } from './msg_s2c/MsgPlayerChange'; import { MsgPrivate } from './msg_s2c/MsgPrivate'; +import { MsgPushGiftChange } from './msg_s2c/MsgPushGiftChange'; import { MsgSendGift } from './msg_s2c/MsgSendGift'; import { MsgShiwuChange } from './msg_s2c/MsgShiwuChange'; import { MsgTaskChange } from './msg_s2c/MsgTaskChange'; @@ -263,9 +264,10 @@ import { ReqBingo, ResBingo } from './PtlBingo'; import { ReqFightTest, ResFightTest } from './PtlFightTest'; import { ReqSyncBtn, ResSyncBtn } from './PtlSyncBtn'; import { ReqTest, ResTest } from './PtlTest'; +import { ReqOpen as ReqOpen_48, ResOpen as ResOpen_48 } from './pushgift/PtlOpen'; import { ReqFight as ReqFight_9, ResFight as ResFight_9 } from './qjzzd/PtlFight'; -import { ReqOpen as ReqOpen_48, ResOpen as ResOpen_48 } from './qjzzd/PtlOpen'; -import { ReqOpen as ReqOpen_49, ResOpen as ResOpen_49 } from './rank/PtlOpen'; +import { ReqOpen as ReqOpen_49, ResOpen as ResOpen_49 } from './qjzzd/PtlOpen'; +import { ReqOpen as ReqOpen_50, ResOpen as ResOpen_50 } from './rank/PtlOpen'; import { ReqConcise, ResConcise } from './shiwu/PtlConcise'; import { ReqExtract, ResExtract } from './shiwu/PtlExtract'; import { ReqGetList as ReqGetList_7, ResGetList as ResGetList_7 } from './shiwu/PtlGetList'; @@ -273,20 +275,20 @@ import { ReqLvUp as ReqLvUp_3, ResLvUp as ResLvUp_3 } from './shiwu/PtlLvUp'; import { ReqRecast, ResRecast } from './shiwu/PtlRecast'; import { ReqTakeOff as ReqTakeOff_2, ResTakeOff as ResTakeOff_2 } from './shiwu/PtlTakeOff'; import { ReqWear as ReqWear_2, ResWear as ResWear_2 } from './shiwu/PtlWear'; -import { ReqOpen as ReqOpen_50, ResOpen as ResOpen_50 } from './shootGame/PtlOpen'; +import { ReqOpen as ReqOpen_51, ResOpen as ResOpen_51 } from './shootGame/PtlOpen'; import { ReqRec as ReqRec_13, ResRec as ResRec_13 } from './shootGame/PtlRec'; import { ReqBuy as ReqBuy_6, ResBuy as ResBuy_6 } from './shop/PtlBuy'; -import { ReqOpen as ReqOpen_51, ResOpen as ResOpen_51 } from './shop/PtlOpen'; +import { ReqOpen as ReqOpen_52, ResOpen as ResOpen_52 } from './shop/PtlOpen'; import { ReqRefresh as ReqRefresh_6, ResRefresh as ResRefresh_6 } from './shop/PtlRefresh'; import { ReqGetBoxPrize, ResGetBoxPrize } from './sign/PtlGetBoxPrize'; import { ReqGetPrize as ReqGetPrize_2, ResGetPrize as ResGetPrize_2 } from './sign/PtlGetPrize'; -import { ReqOpen as ReqOpen_52, ResOpen as ResOpen_52 } from './sign/PtlOpen'; +import { ReqOpen as ReqOpen_53, ResOpen as ResOpen_53 } from './sign/PtlOpen'; import { ReqAim, ResAim } from './slzd/PtlAim'; import { ReqBuyNum as ReqBuyNum_4, ResBuyNum as ResBuyNum_4 } from './slzd/PtlBuyNum'; import { ReqFight as ReqFight_10, ResFight as ResFight_10 } from './slzd/PtlFight'; import { ReqFightLog as ReqFightLog_2, ResFightLog as ResFightLog_2 } from './slzd/PtlFightLog'; import { ReqMyRank, ResMyRank } from './slzd/PtlMyRank'; -import { ReqOpen as ReqOpen_53, ResOpen as ResOpen_53 } from './slzd/PtlOpen'; +import { ReqOpen as ReqOpen_54, ResOpen as ResOpen_54 } from './slzd/PtlOpen'; import { ReqOpenFort, ResOpenFort } from './slzd/PtlOpenFort'; import { ReqRec as ReqRec_14, ResRec as ResRec_14 } from './slzd/PtlRec'; import { ReqRefresh as ReqRefresh_7, ResRefresh as ResRefresh_7 } from './slzd/PtlRefresh'; @@ -295,11 +297,11 @@ import { ReqEvent, ResEvent } from './tanxian/PtlEvent'; import { ReqFastGuaJi, ResFastGuaJi } from './tanxian/PtlFastGuaJi'; import { ReqFight as ReqFight_11, ResFight as ResFight_11 } from './tanxian/PtlFight'; import { ReqGuaJi, ResGuaJi } from './tanxian/PtlGuaJi'; -import { ReqOpen as ReqOpen_54, ResOpen as ResOpen_54 } from './tanxian/PtlOpen'; +import { ReqOpen as ReqOpen_55, ResOpen as ResOpen_55 } from './tanxian/PtlOpen'; import { ReqReceive as ReqReceive_6, ResReceive as ResReceive_6 } from './tanxian/PtlReceive'; import { ReqAllFinsh, ResAllFinsh } from './task/PtlAllFinsh'; import { ReqFinsh, ResFinsh } from './task/PtlFinsh'; -import { ReqOpen as ReqOpen_55, ResOpen as ResOpen_55 } from './task/PtlOpen'; +import { ReqOpen as ReqOpen_56, ResOpen as ResOpen_56 } from './task/PtlOpen'; import { ReqCDKEY, ResCDKEY } from './user/PtlCDKEY'; import { ReqChangeInfo, ResChangeInfo } from './user/PtlChangeInfo'; import { ReqChangeName, ResChangeName } from './user/PtlChangeName'; @@ -315,7 +317,7 @@ import { ReqRenownOpen, ResRenownOpen } from './user/PtlRenownOpen'; import { ReqTujian, ResTujian } from './user/PtlTujian'; import { ReqDecompose, ResDecompose } from './weixiuchang/PtlDecompose'; import { ReqExchange, ResExchange } from './weixiuchang/PtlExchange'; -import { ReqOpen as ReqOpen_56, ResOpen as ResOpen_56 } from './weixiuchang/PtlOpen'; +import { ReqOpen as ReqOpen_57, ResOpen as ResOpen_57 } from './weixiuchang/PtlOpen'; import { ReqUpLv, ResUpLv } from './weixiuchang/PtlUpLv'; import { ReqUpStar, ResUpStar } from './weixiuchang/PtlUpStar'; import { ReqAutoBaoMing, ResAutoBaoMing } from './wzry/PtlAutoBaoMing'; @@ -326,7 +328,7 @@ import { ReqDldFight, ResDldFight } from './wzry/PtlDldFight'; import { ReqDldRefre, ResDldRefre } from './wzry/PtlDldRefre'; import { ReqJingCai, ResJingCai } from './wzry/PtlJingCai'; import { ReqJingCaiOpen, ResJingCaiOpen } from './wzry/PtlJingCaiOpen'; -import { ReqOpen as ReqOpen_57, ResOpen as ResOpen_57 } from './wzry/PtlOpen'; +import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './wzry/PtlOpen'; import { ReqUpdateFight, ResUpdateFight } from './wzry/PtlUpdateFight'; import { ReqWzzd, ResWzzd } from './wzry/PtlWzzd'; import { ReqZuanShiOpen, ResZuanShiOpen } from './wzry/PtlZuanShiOpen'; @@ -334,7 +336,7 @@ import { ReqAllGet, ResAllGet } from './xstask/PtlAllGet'; import { ReqGet as ReqGet_3, ResGet as ResGet_3 } from './xstask/PtlGet'; import { ReqLvUp as ReqLvUp_4, ResLvUp as ResLvUp_4 } from './xstask/PtlLvUp'; import { ReqOnekeyReceive, ResOnekeyReceive } from './xstask/PtlOnekeyReceive'; -import { ReqOpen as ReqOpen_58, ResOpen as ResOpen_58 } from './xstask/PtlOpen'; +import { ReqOpen as ReqOpen_59, ResOpen as ResOpen_59 } from './xstask/PtlOpen'; import { ReqReceive as ReqReceive_7, ResReceive as ResReceive_7 } from './xstask/PtlReceive'; import { ReqRefresh as ReqRefresh_8, ResRefresh as ResRefresh_8 } from './xstask/PtlRefresh'; import { ReqHandle, ResHandle } from './yongbingzhuzhan/PtlHandle'; @@ -1288,18 +1290,22 @@ export interface ServiceType { req: ReqTest, res: ResTest }, + "pushgift/Open": { + req: ReqOpen_48, + res: ResOpen_48 + }, "qjzzd/Fight": { req: ReqFight_9, res: ResFight_9 }, "qjzzd/Open": { - req: ReqOpen_48, - res: ResOpen_48 - }, - "rank/Open": { req: ReqOpen_49, res: ResOpen_49 }, + "rank/Open": { + req: ReqOpen_50, + res: ResOpen_50 + }, "shiwu/Concise": { req: ReqConcise, res: ResConcise @@ -1329,8 +1335,8 @@ export interface ServiceType { res: ResWear_2 }, "shootGame/Open": { - req: ReqOpen_50, - res: ResOpen_50 + req: ReqOpen_51, + res: ResOpen_51 }, "shootGame/Rec": { req: ReqRec_13, @@ -1341,8 +1347,8 @@ export interface ServiceType { res: ResBuy_6 }, "shop/Open": { - req: ReqOpen_51, - res: ResOpen_51 + req: ReqOpen_52, + res: ResOpen_52 }, "shop/Refresh": { req: ReqRefresh_6, @@ -1357,8 +1363,8 @@ export interface ServiceType { res: ResGetPrize_2 }, "sign/Open": { - req: ReqOpen_52, - res: ResOpen_52 + req: ReqOpen_53, + res: ResOpen_53 }, "slzd/Aim": { req: ReqAim, @@ -1381,8 +1387,8 @@ export interface ServiceType { res: ResMyRank }, "slzd/Open": { - req: ReqOpen_53, - res: ResOpen_53 + req: ReqOpen_54, + res: ResOpen_54 }, "slzd/OpenFort": { req: ReqOpenFort, @@ -1417,8 +1423,8 @@ export interface ServiceType { res: ResGuaJi }, "tanxian/Open": { - req: ReqOpen_54, - res: ResOpen_54 + req: ReqOpen_55, + res: ResOpen_55 }, "tanxian/Receive": { req: ReqReceive_6, @@ -1433,8 +1439,8 @@ export interface ServiceType { res: ResFinsh }, "task/Open": { - req: ReqOpen_55, - res: ResOpen_55 + req: ReqOpen_56, + res: ResOpen_56 }, "user/CDKEY": { req: ReqCDKEY, @@ -1497,8 +1503,8 @@ export interface ServiceType { res: ResExchange }, "weixiuchang/Open": { - req: ReqOpen_56, - res: ResOpen_56 + req: ReqOpen_57, + res: ResOpen_57 }, "weixiuchang/UpLv": { req: ReqUpLv, @@ -1541,8 +1547,8 @@ export interface ServiceType { res: ResJingCaiOpen }, "wzry/Open": { - req: ReqOpen_57, - res: ResOpen_57 + req: ReqOpen_58, + res: ResOpen_58 }, "wzry/UpdateFight": { req: ReqUpdateFight, @@ -1573,8 +1579,8 @@ export interface ServiceType { res: ResOnekeyReceive }, "xstask/Open": { - req: ReqOpen_58, - res: ResOpen_58 + req: ReqOpen_59, + res: ResOpen_59 }, "xstask/Receive": { req: ReqReceive_7, @@ -1626,6 +1632,7 @@ export interface ServiceType { "msg_s2c/PeijianChange": MsgPeijianChange, "msg_s2c/PlayerChange": MsgPlayerChange, "msg_s2c/Private": MsgPrivate, + "msg_s2c/PushGiftChange": MsgPushGiftChange, "msg_s2c/SendGift": MsgSendGift, "msg_s2c/ShiwuChange": MsgShiwuChange, "msg_s2c/TaskChange": MsgTaskChange, @@ -2922,91 +2929,96 @@ export const serviceProto: ServiceProto = { }, { "id": 237, - "name": "msg_s2c/SendGift", + "name": "msg_s2c/PushGiftChange", "type": "msg" }, { "id": 238, - "name": "msg_s2c/ShiwuChange", + "name": "msg_s2c/SendGift", "type": "msg" }, { "id": 239, - "name": "msg_s2c/TaskChange", + "name": "msg_s2c/ShiwuChange", "type": "msg" }, { "id": 240, - "name": "msg_s2c/Xianshilibao", + "name": "msg_s2c/TaskChange", "type": "msg" }, { "id": 241, + "name": "msg_s2c/Xianshilibao", + "type": "msg" + }, + { + "id": 242, "name": "pata/Fight", "type": "api" }, { - "id": 242, + "id": 243, "name": "pata/GetPrize", "type": "api" }, { - "id": 243, + "id": 244, "name": "pata/Open", "type": "api" }, { - "id": 244, + "id": 245, "name": "pata/SaoDang", "type": "api" }, { - "id": 245, + "id": 246, "name": "pay/GetList", "type": "api" }, { - "id": 246, + "id": 247, "name": "peijian/GetList", "type": "api" }, { - "id": 247, + "id": 248, "name": "peijian/JingLian", "type": "api" }, { - "id": 248, + "id": 249, "name": "peijian/JinJie", "type": "api" }, { - "id": 249, + "id": 250, "name": "peijian/LvUp", "type": "api" }, { - "id": 250, + "id": 251, "name": "peijian/OneKeyLvUp", "type": "api" }, { - "id": 251, + "id": 252, "name": "peijian/OneKeyWear", "type": "api" }, { - "id": 252, + "id": 253, "name": "peijian/Reset", "type": "api" }, { - "id": 253, + "id": 254, "name": "peijian/Rm", "type": "api" }, { - "id": 254, + "id": 255, "name": "peijian/TakeOff", "type": "api", "conf": { @@ -3014,32 +3026,32 @@ export const serviceProto: ServiceProto = { } }, { - "id": 255, + "id": 256, "name": "peijian/UnLock", "type": "api" }, { - "id": 256, + "id": 257, "name": "peijian/Wear", "type": "api" }, { - "id": 257, + "id": 258, "name": "peijiancangku/Deal", "type": "api" }, { - "id": 258, + "id": 259, "name": "peijiancangku/Jump", "type": "api" }, { - "id": 259, + "id": 260, "name": "peijiancangku/Open", "type": "api" }, { - "id": 260, + "id": 261, "name": "Bingo", "type": "api", "conf": { @@ -3047,137 +3059,142 @@ export const serviceProto: ServiceProto = { } }, { - "id": 261, + "id": 262, "name": "FightTest", "type": "api" }, { - "id": 262, + "id": 263, "name": "SyncBtn", "type": "api" }, { - "id": 263, + "id": 264, "name": "Test", "type": "api" }, - { - "id": 264, - "name": "qjzzd/Fight", - "type": "api" - }, { "id": 265, - "name": "qjzzd/Open", + "name": "pushgift/Open", "type": "api" }, { "id": 266, - "name": "rank/Open", + "name": "qjzzd/Fight", "type": "api" }, { "id": 267, - "name": "shiwu/Concise", + "name": "qjzzd/Open", "type": "api" }, { "id": 268, - "name": "shiwu/Extract", + "name": "rank/Open", "type": "api" }, { "id": 269, - "name": "shiwu/GetList", + "name": "shiwu/Concise", "type": "api" }, { "id": 270, - "name": "shiwu/LvUp", + "name": "shiwu/Extract", "type": "api" }, { "id": 271, - "name": "shiwu/Recast", + "name": "shiwu/GetList", "type": "api" }, { "id": 272, - "name": "shiwu/TakeOff", + "name": "shiwu/LvUp", "type": "api" }, { "id": 273, - "name": "shiwu/Wear", + "name": "shiwu/Recast", "type": "api" }, { "id": 274, - "name": "shootGame/Open", + "name": "shiwu/TakeOff", "type": "api" }, { "id": 275, - "name": "shootGame/Rec", + "name": "shiwu/Wear", "type": "api" }, { "id": 276, - "name": "shop/Buy", + "name": "shootGame/Open", "type": "api" }, { "id": 277, - "name": "shop/Open", + "name": "shootGame/Rec", "type": "api" }, { "id": 278, - "name": "shop/Refresh", + "name": "shop/Buy", "type": "api" }, { "id": 279, - "name": "sign/GetBoxPrize", + "name": "shop/Open", "type": "api" }, { "id": 280, - "name": "sign/GetPrize", + "name": "shop/Refresh", "type": "api" }, { "id": 281, - "name": "sign/Open", + "name": "sign/GetBoxPrize", "type": "api" }, { "id": 282, - "name": "slzd/Aim", + "name": "sign/GetPrize", "type": "api" }, { "id": 283, - "name": "slzd/BuyNum", + "name": "sign/Open", "type": "api" }, { "id": 284, - "name": "slzd/Fight", + "name": "slzd/Aim", "type": "api" }, { "id": 285, - "name": "slzd/FightLog", + "name": "slzd/BuyNum", "type": "api" }, { "id": 286, - "name": "slzd/MyRank", + "name": "slzd/Fight", "type": "api" }, { "id": 287, + "name": "slzd/FightLog", + "type": "api" + }, + { + "id": 288, + "name": "slzd/MyRank", + "type": "api" + }, + { + "id": 289, "name": "slzd/Open", "type": "api", "conf": { @@ -3187,77 +3204,77 @@ export const serviceProto: ServiceProto = { } }, { - "id": 288, + "id": 290, "name": "slzd/OpenFort", "type": "api" }, { - "id": 289, + "id": 291, "name": "slzd/Rec", "type": "api" }, { - "id": 290, + "id": 292, "name": "slzd/Refresh", "type": "api" }, { - "id": 291, + "id": 293, "name": "slzd/Slot", "type": "api" }, { - "id": 292, + "id": 294, "name": "tanxian/Event", "type": "api" }, { - "id": 293, + "id": 295, "name": "tanxian/FastGuaJi", "type": "api" }, { - "id": 294, + "id": 296, "name": "tanxian/Fight", "type": "api" }, { - "id": 295, + "id": 297, "name": "tanxian/GuaJi", "type": "api" }, { - "id": 296, + "id": 298, "name": "tanxian/Open", "type": "api" }, { - "id": 297, + "id": 299, "name": "tanxian/Receive", "type": "api" }, { - "id": 298, + "id": 300, "name": "task/AllFinsh", "type": "api" }, { - "id": 299, + "id": 301, "name": "task/Finsh", "type": "api" }, { - "id": 300, + "id": 302, "name": "task/Open", "type": "api" }, { - "id": 301, + "id": 303, "name": "user/CDKEY", "type": "api" }, { - "id": 302, + "id": 304, "name": "user/ChangeInfo", "type": "api", "conf": { @@ -3265,197 +3282,197 @@ export const serviceProto: ServiceProto = { } }, { - "id": 303, + "id": 305, "name": "user/ChangeName", "type": "api" }, { - "id": 304, + "id": 306, "name": "user/Fight", "type": "api" }, { - "id": 305, + "id": 307, "name": "user/GetInfo", "type": "api" }, { - "id": 306, + "id": 308, "name": "user/InfoOpen", "type": "api" }, { - "id": 307, + "id": 309, "name": "user/Login", "type": "api" }, { - "id": 308, + "id": 310, "name": "user/Ping", "type": "api" }, { - "id": 309, + "id": 311, "name": "user/Renown", "type": "api" }, { - "id": 310, + "id": 312, "name": "user/RenownBuy", "type": "api" }, { - "id": 311, + "id": 313, "name": "user/RenownGetPrize", "type": "api" }, { - "id": 312, + "id": 314, "name": "user/RenownOpen", "type": "api" }, { - "id": 313, + "id": 315, "name": "user/Tujian", "type": "api" }, { - "id": 314, + "id": 316, "name": "weixiuchang/Decompose", "type": "api" }, { - "id": 315, + "id": 317, "name": "weixiuchang/Exchange", "type": "api" }, { - "id": 316, + "id": 318, "name": "weixiuchang/Open", "type": "api" }, { - "id": 317, + "id": 319, "name": "weixiuchang/UpLv", "type": "api" }, { - "id": 318, + "id": 320, "name": "weixiuchang/UpStar", "type": "api" }, { - "id": 319, + "id": 321, "name": "wzry/AutoBaoMing", "type": "api" }, { - "id": 320, + "id": 322, "name": "wzry/BaoMing", "type": "api" }, { - "id": 321, + "id": 323, "name": "wzry/catFightLog", "type": "api" }, { - "id": 322, + "id": 324, "name": "wzry/CatGroup", "type": "api" }, { - "id": 323, + "id": 325, "name": "wzry/DldFight", "type": "api" }, { - "id": 324, + "id": 326, "name": "wzry/DldRefre", "type": "api" }, { - "id": 325, + "id": 327, "name": "wzry/JingCai", "type": "api" }, { - "id": 326, + "id": 328, "name": "wzry/JingCaiOpen", "type": "api" }, { - "id": 327, + "id": 329, "name": "wzry/Open", "type": "api" }, { - "id": 328, + "id": 330, "name": "wzry/UpdateFight", "type": "api" }, { - "id": 329, + "id": 331, "name": "wzry/Wzzd", "type": "api" }, { - "id": 330, + "id": 332, "name": "wzry/ZuanShiOpen", "type": "api" }, { - "id": 331, + "id": 333, "name": "xstask/AllGet", "type": "api" }, { - "id": 332, + "id": 334, "name": "xstask/Get", "type": "api" }, { - "id": 333, + "id": 335, "name": "xstask/LvUp", "type": "api" }, { - "id": 334, + "id": 336, "name": "xstask/OnekeyReceive", "type": "api" }, { - "id": 335, + "id": 337, "name": "xstask/Open", "type": "api" }, { - "id": 336, + "id": 338, "name": "xstask/Receive", "type": "api" }, { - "id": 337, + "id": 339, "name": "xstask/Refresh", "type": "api" }, { - "id": 338, + "id": 340, "name": "yongbingzhuzhan/Handle", "type": "api" }, { - "id": 339, + "id": 341, "name": "zhanqianbushu/ChangePos", "type": "api" }, { - "id": 340, + "id": 342, "name": "zhanqianbushu/Select", "type": "api" }, { - "id": 341, + "id": 343, "name": "zhanqianbushu/Up", "type": "api" } @@ -17888,6 +17905,10 @@ export const serviceProto: ServiceProto = { } } }, + "msg_s2c/MsgPushGiftChange/MsgPushGiftChange": { + "type": "Literal", + "literal": 1 + }, "msg_s2c/MsgSendGift/MsgSendGift": { "type": "Interface", "indexSignature": { @@ -18969,6 +18990,81 @@ export const serviceProto: ServiceProto = { "PtlTest/ResTest": { "type": "Any" }, + "pushgift/PtlOpen/ReqOpen": { + "type": "Interface" + }, + "pushgift/PtlOpen/ResOpen": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "gifts", + "type": { + "type": "Array", + "elementType": { + "type": "Reference", + "target": "../../module/collection_pushgift/Gift" + } + } + } + ] + }, + "../../module/collection_pushgift/Gift": { + "type": "Interface", + "properties": [ + { + "id": 0, + "name": "id", + "type": { + "type": "String" + } + }, + { + "id": 1, + "name": "uid", + "type": { + "type": "String" + } + }, + { + "id": 2, + "name": "buy", + "type": { + "type": "Array", + "elementType": { + "type": "Number" + } + } + }, + { + "id": 3, + "name": "ctime", + "type": { + "type": "Number" + } + }, + { + "id": 4, + "name": "passTime", + "type": { + "type": "Number" + } + }, + { + "id": 5, + "name": "ext_data", + "type": { + "type": "Interface", + "indexSignature": { + "keyType": "String", + "type": { + "type": "Any" + } + } + } + } + ] + }, "qjzzd/PtlFight/ReqFight": { "type": "Interface" },