diff --git a/src/fix_patch/patch_20240112.ts b/src/fix_patch/patch_20240112.ts index a51f304..2c1f3ba 100644 --- a/src/fix_patch/patch_20240112.ts +++ b/src/fix_patch/patch_20240112.ts @@ -3,13 +3,32 @@ import { patchFun, patchInit } from "../patch"; class Path { async huodong2(a: any) { + const con ={ + 2002:[ + { payId: '', num: 1, prize: [{a: 'item', t: '50', n: 20}, {a: 'attr', t: 'rmbmoney', n: 200}], free: true }, + { payId: 'duihuan_1_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, + { payId: 'duihuan_1_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, + { payId: 'duihuan_1_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, + { payId: 'duihuan_1_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, + { payId: 'duihuan_1_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_1_1', prize: [{a: 'item', t: '50', n: 50}, {a: 'attr', t: 'rmbmoney', n: 600}], free: false }, + { payId: 'duihuan_1_2', prize: [{a: 'item', t: '50', n: 100}, {a: 'attr', t: 'rmbmoney', n: 1360}], free: false }, + { payId: 'duihuan_1_3', prize: [{a: 'item', t: '50', n: 200}, {a: 'attr', t: 'rmbmoney', n: 2560}], free: false }, + { payId: 'duihuan_1_4', prize: [{a: 'item', t: '50', n: 600}, {a: 'attr', t: 'rmbmoney', n: 6560}], free: false }, + { payId: 'duihuan_1_5', prize: [{a: 'item', t: '50', n: 1200}, {a: 'attr', t: 'rmbmoney', n: 12960}], free: false }, + ] + } + 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.gift = {} + hdinfo.data.event.gift = con[hdinfo.hdid] - await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.figt": {}} }); + await G.mongodb.collection('hdinfo').updateOne({ "hdid": hdinfo.hdid}, { "$set": {"data.event.gift": hdinfo.data.event.gift}}); console.log(hdinfo.hdid,"finish") } return "sucess!!!"