Commit 62db6f00 authored by 何娜's avatar 何娜

test

parent e9416ff3
Pipeline #5023 passed with stage
in 2 seconds
...@@ -105,6 +105,7 @@ class TaskController extends Controller { ...@@ -105,6 +105,7 @@ class TaskController extends Controller {
const {ctx, service} = this; const {ctx, service} = this;
const {taskId} = ctx.request.body; const {taskId} = ctx.request.body;
const result = await service.task.fetchTask({taskId}); const result = await service.task.fetchTask({taskId});
ctx.logger.info('原始数据result:----', result, '-----------------666')
ctx.success(); ctx.success();
let taskNote = { let taskNote = {
status: 'init', status: 'init',
...@@ -144,7 +145,6 @@ class TaskController extends Controller { ...@@ -144,7 +145,6 @@ class TaskController extends Controller {
note: {message: 'task success'}, note: {message: 'task success'},
}; };
try { try {
// const insertData = await service.washData.wash(result);
const order = await service.order.getOneByTaskId(taskId); const order = await service.order.getOneByTaskId(taskId);
if (!order) { if (!order) {
throw new Error('任务已经结束了'); throw new Error('任务已经结束了');
...@@ -152,13 +152,16 @@ class TaskController extends Controller { ...@@ -152,13 +152,16 @@ class TaskController extends Controller {
const {orderId, appkey} = order; const {orderId, appkey} = order;
ctx.logger.info(result.cityId) ctx.logger.info(result.cityId)
const script = await service.scripts.fetchOneScripts(result.cityId); const script = await service.scripts.fetchOneScripts(result.cityId);
ctx.logger.info('callback-script', JSON.stringify(script)) ctx.logger.info('callback-script-----------', JSON.stringify(script))
result.cityId = '12';
result.cityName = '北京';
result.taskId = taskId;
result.data = JSON.parse(result.data.data);
result.orderSn = orderId; result.orderSn = orderId;
result.orderId = orderId; result.orderId = orderId;
// result.cityName = script.name || 'unknown'; result.appKey = appkey;
result.taskId = taskId;
// result.appKey = appkey;
delete result.code; delete result.code;
delete result.msg;
await service.storage.write(result); await service.storage.write(result);
await service.partner.notice(order); await service.partner.notice(order);
} catch (err) { } catch (err) {
......
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