修正活动保存时, 错误的更新状态的bug
This commit is contained in:
parent
6abd7cfcf2
commit
3aaad6954a
@ -51,7 +51,7 @@ class ShopactivityController extends BaseController {
|
||||
record.updateFromReq(req.params)
|
||||
}
|
||||
if (record.active) {
|
||||
await ShopActivity.updateMany({active: true}, {active: false})
|
||||
await ShopActivity.updateMany({active: true, _id: {$ne: record._id}}, {active: false})
|
||||
}
|
||||
await record.save()
|
||||
return record.toJson()
|
||||
|
Loading…
x
Reference in New Issue
Block a user