From 7537f108ad11a6faab0fb37e59935433306ae8a9 Mon Sep 17 00:00:00 2001 From: ciniao <4041990@qq.com> Date: Tue, 26 Dec 2023 10:32:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=85=A2=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setMongodb.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/setMongodb.ts b/src/setMongodb.ts index ec7356a..7860f9c 100644 --- a/src/setMongodb.ts +++ b/src/setMongodb.ts @@ -93,6 +93,9 @@ const indexs: Partial<{ [k in keyof MongodbCollections]: IndexDescription[] }> = }, { key: {uid: 1} + }, + { + key: {type: 1} } ], pata: [ From 2a78f515b1644383ac729ba53e9a040fc2a7c791 Mon Sep 17 00:00:00 2001 From: chenkai Date: Tue, 26 Dec 2023 11:50:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=A4=A7=E4=B9=B1=E6=96=97=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=A7=AF=E5=88=86=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/wzry/ApiDldFight.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api_s2c/wzry/ApiDldFight.ts b/src/api_s2c/wzry/ApiDldFight.ts index abe561f..1f1b56e 100644 --- a/src/api_s2c/wzry/ApiDldFight.ts +++ b/src/api_s2c/wzry/ApiDldFight.ts @@ -7,6 +7,8 @@ import { ReqDldFight, ResDldFight } from "../../shared/protocols/wzry/PtlDldFigh import { PublicShared } from "../../shared/public/public"; import { HongDianChange } from "../hongdian/fun"; +const maxScore = 269; // 积分上限 + export default async function (call: ApiCall) { let status = await WangZheRongYaofun.getWangZheStatus(); if (status.status != 3) { @@ -41,6 +43,10 @@ export default async function (call: ApiCall) { let _jifen = _myFight.jifen; _myFight.jifen = _myFight.jifen + await WangZheRongYaofun.getMyScore(dldfight); + // 添加积分上限 (策划要求) + if (_myFight.jifen > maxScore) { + _myFight.jifen = maxScore; + } // 设置数据 let _r = await WangZheRongYaofun.setWzryDldFight(call, _myFight);