Commit f7c5f54a authored by 姜登's avatar 姜登

gjj

parent 446f7f66
Pipeline #3945 passed with stage
in 7 seconds
...@@ -136,7 +136,7 @@ class TaskController extends Controller { ...@@ -136,7 +136,7 @@ class TaskController extends Controller {
} }
const { orderId, appKey } = order; const { orderId, appKey } = order;
insertData.orderId = orderId; insertData.orderId = orderId;
insertData.cityName = insertData.location; insertData.cityName = service.scripts.fetchScriptName(insertData.cid);
insertData.taskId = taskId; insertData.taskId = taskId;
insertData.appKey = appKey; insertData.appKey = appKey;
delete insertData.code; delete insertData.code;
......
...@@ -158,6 +158,15 @@ class ScriptsService extends Service { ...@@ -158,6 +158,15 @@ class ScriptsService extends Service {
const scriptList = await this.fetchScriptByCityName(city); const scriptList = await this.fetchScriptByCityName(city);
return scriptList; return scriptList;
} }
async fetchScriptName(scriptId) {
try {
const city = await this.fetchOneScripts(scriptId);
return city.name;
} catch (err) {
return '未知';
}
}
} }
module.exports = ScriptsService; module.exports = ScriptsService;
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