From 06062716efa7b25ec3b98c93b94434da60ff8091 Mon Sep 17 00:00:00 2001 From: chenkai Date: Fri, 22 Dec 2023 13:40:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E6=97=B6=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=9D=A1=E4=BB=B6=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/payForDiamond/ApiReceive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api_s2c/event/payForDiamond/ApiReceive.ts b/src/api_s2c/event/payForDiamond/ApiReceive.ts index 768fed2..3ceedf5 100644 --- a/src/api_s2c/event/payForDiamond/ApiReceive.ts +++ b/src/api_s2c/event/payForDiamond/ApiReceive.ts @@ -73,7 +73,7 @@ export default async function (call: ApiCall) { // 减去余额 const filter = { hdid: call.req.activityId, - $expr: {$gte: [ `$data.totalmoney - ${gotAmount}`, 0 ]}, + $expr: { $gte: ['$data.totalmoney', gotAmount ]}, }; const updateDoc = { $inc: { 'data.totalmoney': -1 * Math.abs(gotAmount) }