From 48cd24d309b9209d87df05ae9d6a8913bd6e6bea Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Thu, 11 Jan 2024 18:45:59 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=E8=B6=85=E5=80=BC=E5=9F=BA=E9=87=91?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A5=96=E5=8A=B1=E9=80=BB=E8=BE=91=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/yuedujijin/ApiRec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/yuedujijin/ApiRec.ts b/src/api_s2c/event/yuedujijin/ApiRec.ts index 039f191..0db9481 100644 --- a/src/api_s2c/event/yuedujijin/ApiRec.ts +++ b/src/api_s2c/event/yuedujijin/ApiRec.ts @@ -16,8 +16,8 @@ export default async function (call: ApiCall) { if (call.req.index > day) return call.errorCode(-3); if (rec.includes(call.req.index)) return call.errorCode(-4); - - G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true}); + // 从异步改成同步 + await G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true}); await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index])); From 8aab7b6322b88524b480318a3a95be2eaddf9531 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 10 Jan 2024 20:37:58 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=E5=A4=84=E7=90=86=E4=BA=BA=E6=89=8D?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E4=BB=BB=E5=8A=A1=E9=A2=86=E5=8F=96=E6=A0=87?= =?UTF-8?q?=E8=AF=86=E5=9C=A8=E5=88=B7=20=E6=96=B0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=B2=A1=E6=9C=89=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/yangchengmubiao/ApiRec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api_s2c/event/yangchengmubiao/ApiRec.ts b/src/api_s2c/event/yangchengmubiao/ApiRec.ts index c7c1bae..6d0efa0 100644 --- a/src/api_s2c/event/yangchengmubiao/ApiRec.ts +++ b/src/api_s2c/event/yangchengmubiao/ApiRec.ts @@ -35,6 +35,7 @@ export default async function (call: ApiCall) { _mydata.lunci += 1 _setData["taskval"] = _mydata.taskval _setData["lunci"] = _mydata.lunci + _setData["finishid"] = _mydata.finishid } // 设置任务改变数据 From 0a94965e3020eaa99c02a1749d467bf25716f80d Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 10 Jan 2024 21:14:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=E7=AB=9E=E6=8A=80=E5=9C=BA=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E5=90=8D=E5=A4=B4=E5=83=8F=E7=89=B9=E6=AE=8A=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=94=A8=E9=81=93=E5=85=B7?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=A7=A3=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/chuanshuozhilu/ApiOpen.ts | 1 + src/localConfig.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts index a1d648d..cad12c5 100644 --- a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts +++ b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts @@ -17,6 +17,7 @@ export default async function (call: ApiCall) { // 如果初始没有数据,就判断玩家是否有活动对应的影响,生成一下初始化数据 if (!db) { + let _dbType: `chuanshuozhilu${number}` = `chuanshuozhilu${call.req.hdid}` const hid = _hdinfo.data.hid let heros = await G.mongodb.collection("hero").find({uid: call.uid, heroId: hid}) diff --git a/src/localConfig.ts b/src/localConfig.ts index 5b04b02..d8bcfee 100644 --- a/src/localConfig.ts +++ b/src/localConfig.ts @@ -17,7 +17,7 @@ export default { /**redis url */ redisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/0', /**mongodb url */ - mongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao?authSource=admin', + mongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_ysr?authSource=admin', /**cross redis url */ crossRedisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/1', /**cross mongodb url */ @@ -27,7 +27,7 @@ export default { /**服务器时间 */ time: '', /**开服时间 */ - openTime: '2023-12-11 1:0:0', + openTime: '2024-01-05 1:0:0', /**项目名称 */ projectName: 'heijiao', /**加密key */ From 363787fb394586da2571baf7d3c02fc4dda4e0bd Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 10 Jan 2024 21:16:13 +0800 Subject: [PATCH 4/5] =?UTF-8?q?Revert=20"fix:=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E5=90=8D=E5=A4=B4=E5=83=8F=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=A4=84=E7=90=86=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=94=A8=E9=81=93?= =?UTF-8?q?=E5=85=B7=E7=9B=B4=E6=8E=A5=E8=A7=A3=E9=94=81"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0a94965e3020eaa99c02a1749d467bf25716f80d. --- src/api_s2c/event/chuanshuozhilu/ApiOpen.ts | 1 - src/localConfig.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts index cad12c5..a1d648d 100644 --- a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts +++ b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts @@ -17,7 +17,6 @@ export default async function (call: ApiCall) { // 如果初始没有数据,就判断玩家是否有活动对应的影响,生成一下初始化数据 if (!db) { - let _dbType: `chuanshuozhilu${number}` = `chuanshuozhilu${call.req.hdid}` const hid = _hdinfo.data.hid let heros = await G.mongodb.collection("hero").find({uid: call.uid, heroId: hid}) diff --git a/src/localConfig.ts b/src/localConfig.ts index d8bcfee..5b04b02 100644 --- a/src/localConfig.ts +++ b/src/localConfig.ts @@ -17,7 +17,7 @@ export default { /**redis url */ redisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/0', /**mongodb url */ - mongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao_ysr?authSource=admin', + mongodbUrl: 'mongodb://root:lyMaple525458@10.0.1.20:27017/heijiao?authSource=admin', /**cross redis url */ crossRedisUrl: 'redis://:lyMaple525458@10.0.1.20:6379/1', /**cross mongodb url */ @@ -27,7 +27,7 @@ export default { /**服务器时间 */ time: '', /**开服时间 */ - openTime: '2024-01-05 1:0:0', + openTime: '2023-12-11 1:0:0', /**项目名称 */ projectName: 'heijiao', /**加密key */ From b80263ed16ac6f2910136123dbb5b016c27155dd Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Wed, 10 Jan 2024 21:17:04 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=E7=AB=9E=E6=8A=80=E5=9C=BA=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E5=90=8D=E5=A4=B4=E5=83=8F=E7=89=B9=E6=AE=8A=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=8F=AF=E4=BB=A5=E7=94=A8=E9=81=93=E5=85=B7?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=A7=A3=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/chuanshuozhilu/ApiOpen.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts index a1d648d..bd9bf35 100644 --- a/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts +++ b/src/api_s2c/event/chuanshuozhilu/ApiOpen.ts @@ -35,6 +35,7 @@ export default async function (call: ApiCall) { if (!cache[call.uid]) cache[call.uid] = {hid:{}}; if (!cache[call.uid][hid]) cache[call.uid][hid] = setInfo; _info[hid] = setInfo + G.server.sendMsgByUid(call.uid, 'msg_s2c/HongDianChange', ['huodonghd']); }