Commit e5a8731f authored by Hsinli's avatar Hsinli

add

parent 3f690b4d
Pipeline #9187 passed with stage
in 5 seconds
...@@ -269,6 +269,7 @@ class Export20190425 extends Controller { ...@@ -269,6 +269,7 @@ class Export20190425 extends Controller {
id: [], id: [],
}; };
if (res.rowCount > 0) { if (res.rowCount > 0) {
let taskList = [];
let list = res.results; let list = res.results;
for (let i in list) { for (let i in list) {
let addData = { let addData = {
...@@ -283,9 +284,14 @@ class Export20190425 extends Controller { ...@@ -283,9 +284,14 @@ class Export20190425 extends Controller {
updated_at: list[i].updatedAt || null, updated_at: list[i].updatedAt || null,
// deleted_at: list[i].xxx, // deleted_at: list[i].xxx,
} }
let id = await ctx.realestateModel.FootPrint.add(addData); taskList[i] = ctx.realestateModel.FootPrint.add(addData);
ret.id.push(id);
} }
const retList = await Promise.all(taskList).then(result => {
return result;
}).catch(error => {
ctx.failed(error);
});
ret.id = retList;
} }
ret.count = ret.id.length; ret.count = ret.id.length;
ctx.success(ret); ctx.success(ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment