Commit e2bc733c authored by 姜登's avatar 姜登

yys

parent 510df3fc
Pipeline #6763 passed with stage
in 3 seconds
......@@ -133,14 +133,20 @@ class TaskController extends Controller {
async handleCallback() {
const { ctx, service } = this;
const { taskId } = ctx.request.body;
ctx.body = {
code: '0',
};
const result = await service.task.fetchTask({ taskId });
ctx.success();
const order = await service.order.getOneByTaskId(taskId);
if (!order) {
ctx.logger.error('handleCallback', taskId, '未查询到此任务');
return;
}
const { orderId, appKey, cityId } = order;
const { orderId, appKey, cityId, status } = order;
if (status === 'success' || status === 'failure') {
ctx.logger.error('handleCallback', taskId, status, '此任务已结束');
return;
}
let taskNote = {
status: 'init',
note: { code: 2, msg: '任务正在执行', data: { data: null, loginParam: null, cityId, orderSn: orderId } },
......
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