Commit f6677b87 authored by 何娜's avatar 何娜

taxh5 通知优化

parent 22dec9f0
Pipeline #6360 passed with stage
in 6 seconds
...@@ -125,8 +125,9 @@ class PartnerService extends Service { ...@@ -125,8 +125,9 @@ class PartnerService extends Service {
async notice(order) { async notice(order) {
const { ctx } = this; const { ctx } = this;
ctx.logger.info(`【Partner】 notice into`); ctx.logger.info(`【Partner】 notice into`);
const { orderId, notifyUrl, userId, notice } = order; const { orderId, notifyUrl, userId } = order;
if (notifyUrl && notice !== '1') { if (notifyUrl) {
try{
const ret = await ctx.curl(notifyUrl, { const ret = await ctx.curl(notifyUrl, {
charset: 'utf-8', charset: 'utf-8',
timeout: ['30s', '30s'], timeout: ['30s', '30s'],
...@@ -145,9 +146,13 @@ class PartnerService extends Service { ...@@ -145,9 +146,13 @@ class PartnerService extends Service {
}else{ }else{
await order.update({ notice: ret.status }); await order.update({ notice: ret.status });
} }
} }catch (e) {
ctx.logger.info(`【Partner】 notice err ${e}`)
}finally {
return return
} }
}
}
} }
module.exports = PartnerService; module.exports = PartnerService;
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