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) }