From b7c86e9769b597107e58cdef0f745bc764e923e0 Mon Sep 17 00:00:00 2001 From: yushunrui <364203175@qq.com> Date: Fri, 12 Jan 2024 23:32:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=8F=90=E4=BA=A4=EF=BC=8C?= =?UTF-8?q?=E5=85=91=E6=8D=A2=E6=8E=89=E8=90=BD=E4=BF=AE=E6=94=B9=E7=A4=BC?= =?UTF-8?q?=E5=8C=85=E5=86=85=E5=AE=B9=EF=BC=8C=20=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E6=96=B0=E5=B9=B4=E5=A4=B4=E5=83=8F=E6=A1=86=E5=88=B7=E6=88=90?= =?UTF-8?q?=E6=B0=B8=E4=B9=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fix_patch/patch_20240112.ts | 46 +++++---------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/src/fix_patch/patch_20240112.ts b/src/fix_patch/patch_20240112.ts index 102981f..2a03906 100644 --- a/src/fix_patch/patch_20240112.ts +++ b/src/fix_patch/patch_20240112.ts @@ -3,50 +3,16 @@ import { patchFun, patchInit } from "../patch"; class Path { async huodong2(a: any) { - const con ={ - 2000:[ - { payId: '', num: 1, prize: [{a: 'item', t: '49', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true }, - { payId: 'duihuan_1_1', prize: [{a: 'item', t: '49', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, - { payId: 'duihuan_1_2', prize: [{a: 'item', t: '49', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, - { payId: 'duihuan_1_3', prize: [{a: 'item', t: '49', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, - { payId: 'duihuan_1_4', prize: [{a: 'item', t: '49', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, - { payId: 'duihuan_1_5', prize: [{a: 'item', t: '49', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false }, - ], - 2001: [ - { payId: '', num: 1, prize: [{a: 'item', t: '49', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true }, - { payId: 'duihuan_3_1', prize: [{a: 'item', t: '49', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, - { payId: 'duihuan_3_2', prize: [{a: 'item', t: '49', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, - { payId: 'duihuan_3_3', prize: [{a: 'item', t: '49', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, - { payId: 'duihuan_3_4', prize: [{a: 'item', t: '49', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, - { payId: 'duihuan_3_5', prize: [{a: 'item', t: '49', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false }, - ], - 2002: [ - { payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true }, - { payId: 'duihuan_2_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, - { payId: 'duihuan_2_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, - { payId: 'duihuan_2_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, - { payId: 'duihuan_2_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, - { payId: 'duihuan_2_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false }, - ], - 2003: [ - { payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true }, - { payId: 'duihuan_4_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, - { payId: 'duihuan_4_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, - { payId: 'duihuan_4_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, - { payId: 'duihuan_4_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, - { payId: 'duihuan_4_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false }, - ], - } - - const hdids = [2000,2001,2002,2003] + const hdids = [2002,2003] const hdinfos = await G.mongodb.find('hdinfo', { hdid: { $in: hdids } }) for (let i = 0; i < hdinfos.length; i++) { let hdinfo = hdinfos[i] - hdinfo.data.event.gift = con[hdinfo.hdid] - console.log(hdinfo.hdid,hdinfo.data.event.gift) - await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data": hdinfo.data}}); + hdinfo.data.gift = {} + + await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.figt": {}} }); console.log(hdinfo.hdid,"finish") } + return "sucess!!!" } @@ -58,9 +24,11 @@ class Path { await G.mongodb.collection('user').updateOne({ "uid": user.uid}, { "$set": {"headFrames": user.headFrames} }); console.log(user.uid, user.headFrames) } + return "sucess!!!" } + async run() { await this.huodong2(1); await this.headFrame(1);