From 6d184b20ab8371837a60830b7e9bfa77ae70add4 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Fri, 12 Jan 2024 15:10:53 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E8=84=9A=E6=9C=AC=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=8C=E5=85=91=E6=8D=A2=E6=8E=89=E8=90=BD=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=A4=BC=E5=8C=85=E5=86=85=E5=AE=B9=EF=BC=8C=20=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E6=96=B0=E5=B9=B4=E5=A4=B4=E5=83=8F=E6=A1=86=E5=88=B7?= =?UTF-8?q?=E6=88=90=E6=B0=B8=E4=B9=85"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b7c86e9769b597107e58cdef0f745bc764e923e0. --- src/fix_patch/patch_20240112.ts | 46 ++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/src/fix_patch/patch_20240112.ts b/src/fix_patch/patch_20240112.ts index 2a03906..102981f 100644 --- a/src/fix_patch/patch_20240112.ts +++ b/src/fix_patch/patch_20240112.ts @@ -3,16 +3,50 @@ import { patchFun, patchInit } from "../patch"; class Path { async huodong2(a: any) { - const hdids = [2002,2003] + 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 hdinfos = await G.mongodb.find('hdinfo', { hdid: { $in: hdids } }) for (let i = 0; i < hdinfos.length; i++) { let hdinfo = hdinfos[i] - hdinfo.data.gift = {} - - await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.figt": {}} }); + 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}}); console.log(hdinfo.hdid,"finish") } - return "sucess!!!" } @@ -24,11 +58,9 @@ 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);