Merge branch 'feature/pay_for_diamond' into dev
This commit is contained in:
commit
5801423fb7
@ -73,7 +73,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
|||||||
// 减去余额
|
// 减去余额
|
||||||
const filter = {
|
const filter = {
|
||||||
hdid: call.req.activityId,
|
hdid: call.req.activityId,
|
||||||
$expr: {$gte: [ `$data.totalmoney - ${gotAmount}`, 0 ]},
|
$expr: { $gte: ['$data.totalmoney', gotAmount ]},
|
||||||
};
|
};
|
||||||
const updateDoc = {
|
const updateDoc = {
|
||||||
$inc: { 'data.totalmoney': -1 * Math.abs(gotAmount) }
|
$inc: { 'data.totalmoney': -1 * Math.abs(gotAmount) }
|
||||||
|
Loading…
Reference in New Issue
Block a user