Commit 000d3e8b authored by 李尚科's avatar 李尚科

fix

parent 283cf34c
Pipeline #14104 passed with stage
in 13 seconds
...@@ -152,7 +152,7 @@ class LbsService extends Service { ...@@ -152,7 +152,7 @@ class LbsService extends Service {
key: ctx.app.config.TX_LBS_KEY, key: ctx.app.config.TX_LBS_KEY,
}; };
const resp = await ctx.helper.send_request(ctx.app.config.TX_LBS_ADDRESS_URL + 'ip', params, { method: 'GET' }); const resp = await ctx.helper.send_request(ctx.app.config.TX_LBS_URL + '/location/v1/ip ', params, { method: 'GET' });
// resp.data.status 状态码,0:正常,310:请求参数信息有误,311:Key格式错误,306:请求有护持信息请检查字符串,110:请求来源未被授权 // resp.data.status 状态码,0:正常,310:请求参数信息有误,311:Key格式错误,306:请求有护持信息请检查字符串,110:请求来源未被授权
ctx.logger.info('tx_lbs_ip_resp: ' + JSON.stringify(resp)); ctx.logger.info('tx_lbs_ip_resp: ' + JSON.stringify(resp));
if (resp.status === 200) { if (resp.status === 200) {
......
...@@ -295,6 +295,11 @@ class OrderService extends Service { ...@@ -295,6 +295,11 @@ class OrderService extends Service {
if (order && order.pay_status === 1) { if (order && order.pay_status === 1) {
ctx.failed('订单已支付无需重复支付'); ctx.failed('订单已支付无需重复支付');
} }
const expire_time = moment(order.order_time).valueOf() + 24 * 3600 * 1000;
const now_time = moment().valueOf();
if (expire_time < now_time) {
ctx.failed('订单已失效');
}
ctx.logger.info('11111111111111111111111111111111111'); ctx.logger.info('11111111111111111111111111111111111');
const price = ((order.price - order.preferential_price) * 100).toFixed(); const price = ((order.price - order.preferential_price) * 100).toFixed();
......
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