Commit 601dfc4f by 孙亚楠

dd

parent 8bd8714e
......@@ -61,6 +61,24 @@ class OrderService extends ServiceBase {
}
}
}
async setDeliverOperatorUser(rows) {
if (!rows || rows.length == 0) {
return;
}
let ids = [];
for (let row of rows) {
if (row.odeliver && row.odeliver.operator_id) {
ids.push(row.odeliver.operator_id);
}
}
let map = await this.deliverSve.mayByIds(ids);
for (let row of rows) {
let user = map[row.odeliver.operator_id] || {};
row.odeliver.operator_name = user.real_name || "";
}
}
async setUcUser(rows) {
if (!rows || rows.length == 0) {
......@@ -139,7 +157,11 @@ class OrderService extends ServiceBase {
async aliOrderPageAll(params){
try {
return await this.callms("order", "aliOrderPageAll", params);
let rs = await this.callms("order", "aliOrderPageAll", params);
if (rs.status === 0 && rs.data) {
await this.setDeliverOperatorUser(rs.data.rows);
}
return rs;
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
......@@ -147,7 +169,11 @@ class OrderService extends ServiceBase {
async aliOrderPage(params){
try {
return await this.callms("order", "aliOrderPage", params);
let rs = await this.callms("order", "aliOrderPage", params);
if (rs.status === 0 && rs.data) {
await this.setDeliverOperatorUser(rs.data.rows);
}
return rs;
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
......
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