Commit e85b2db2 authored by 何娜's avatar 何娜

taxh5 修改回调key

parent 55c5be6e
Pipeline #7047 passed with stage
in 2 seconds
...@@ -48,7 +48,7 @@ class OrderController extends Controller { ...@@ -48,7 +48,7 @@ class OrderController extends Controller {
async create() { async create() {
const { ctx, service } = this; const { ctx, service } = this;
ctx.validate(this.createRule); ctx.validate(this.createRule);
let { appKey, userId, notifyUrl, backUrl, orderId } = ctx.request.body; let { appKey, userId, notifyUrl, redirectUrl, orderId } = ctx.request.body;
ctx.logger.info('【orders】 appKey', appKey); ctx.logger.info('【orders】 appKey', appKey);
const appKeyInfo = await service.partner.fetchInfo(appKey); const appKeyInfo = await service.partner.fetchInfo(appKey);
ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo); ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo);
...@@ -61,7 +61,7 @@ class OrderController extends Controller { ...@@ -61,7 +61,7 @@ class OrderController extends Controller {
userId: userId || '', userId: userId || '',
cityId: '', cityId: '',
notifyUrl: notifyUrl || (ctx.app.notifyMap && ctx.app.notifyMap.get(appKey) && ctx.app.notifyMap.get(appKey).notifyUrl) || '', notifyUrl: notifyUrl || (ctx.app.notifyMap && ctx.app.notifyMap.get(appKey) && ctx.app.notifyMap.get(appKey).notifyUrl) || '',
backUrl: backUrl || '', backUrl: redirectUrl || '',
appkey: appKey, appkey: appKey,
status: 'init', status: 'init',
}; };
......
...@@ -143,6 +143,7 @@ class TaskController extends Controller { ...@@ -143,6 +143,7 @@ class TaskController extends Controller {
result.taskId = taskId; result.taskId = taskId;
result.data = JSON.parse(result.data.data); result.data = JSON.parse(result.data.data);
result.orderId = orderId; result.orderId = orderId;
result.orderSn = orderId;
result.appKey = appkey; result.appKey = appkey;
delete result.code; delete result.code;
delete result.msg; delete result.msg;
......
...@@ -48,9 +48,9 @@ class OrderService extends Service { ...@@ -48,9 +48,9 @@ class OrderService extends Service {
return; return;
} }
} }
const { appkey, taskId, notifyUrl, backUrl, userId } = order[0]; const { appkey, taskId, notifyUrl, redirectUrl, userId } = order[0];
if (taskId) { if (taskId) {
await ctx.model.TaskStatus.create({ appkey, status: 'init', notifyUrl, backUrl, userId, ...params }) await ctx.model.TaskStatus.create({ appkey, status: 'init', notifyUrl, backUrl: redirectUrl, userId, ...params })
} else { } else {
await order[0].update(params); await order[0].update(params);
} }
......
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