Browse Source

Resolve bulkcreate debug

release_1.1.2
巴林闲侠 3 years ago
parent
commit
658d6cea85
  1. 15
      code/VideoAccess-VCMP/api/app/lib/controllers/status/index.js

15
code/VideoAccess-VCMP/api/app/lib/controllers/status/index.js

@ -199,13 +199,14 @@ async function resolveEdit (ctx) {
transaction transaction
}) })
await models.CameraStatusResolve.bulkCreate( const bulkCreateD = data.resolve.map(r => {
data.resolve.map(r => { return {
return { statusId: data.statusId,
statusId: data.statusId, resolve: r,
resolve: r }
} })
}), console.log(bulkCreateD);
await models.CameraStatusResolve.bulkCreate(bulkCreateD,
{ transaction } { transaction }
) )

Loading…
Cancel
Save