Commit 10e835cc authored by 姜登's avatar 姜登

gjjh5

parent 11b85bba
Pipeline #15641 passed with stage
in 5 seconds
......@@ -4,7 +4,7 @@
* @Author: jd
* @Date: 2019-02-25 18:59:53
* @LastEditors: jd
* @LastEditTime: 2019-10-31 14:45:58
* @LastEditTime: 2019-10-31 14:59:50
*/
'use strict';
......@@ -124,6 +124,37 @@ class OrderController extends Controller {
}
}
async partnerGjjShow() {
const { ctx, service } = this;
try {
ctx.validate(this.showRule);
let { appKey, orderId, orderSn } = ctx.request.body.params;
orderId = orderId || orderSn;
const appKeyInfo = await service.partner.fetchInfo(appKey);
if (!(appKeyInfo && appKeyInfo.valid === true && appKeyInfo.enableHfData === true)) {
return ctx.fail('未开通此服务');
}
await service.signature.signatureCheck(ctx.request.body);
const data = await service.order.getOneByOrderId({ orderId, status: 'success' });
if (data) {
await service.partner.appKeyLimit(appKey);
const result = await service.storage.read(orderId, appKey);
ctx.body = {
code: 0,
data: result,
};
return;
}
ctx.body = {
code: -1,
msg: '无此订单号',
};
} catch (err) {
ctx.logger.error('partnerShow', JSON.stringify(err));
ctx.error(err);
}
}
async orderShow() {
const { ctx, service } = this;
const { appKey, orderId } = ctx.params;
......
/*
* @Descripttion:
* @version:
* @Author: jd
* @Date: 2019-02-25 18:59:53
* @LastEditors: jd
* @LastEditTime: 2019-10-31 14:57:56
*/
'use strict';
/**
......@@ -38,6 +46,8 @@ module.exports = app => {
gjjRouter.post('/getData', controller.order.partnerShow);// 合作方获取订单数据
gjjRouter.post('/getGjjData', controller.order.partnerGjjShow);// 合作方获取订单数据
gjjRouter.post('/getCityConfig', controller.task.fetchCityConfig);// 获取城市配置
gjjRouter.get('/getCityList', controller.script.partnerScripts);// 获取城市列表状态
......
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