Commit 213e607f by 宋毅

tj

parent ee51e48d
...@@ -251,7 +251,7 @@ class tmqueryCtl extends CtlBase { ...@@ -251,7 +251,7 @@ class tmqueryCtl extends CtlBase {
if (itemCodeList.length < 2) { if (itemCodeList.length < 2) {
return system.getResult(null, "itemCode is error"); return system.getResult(null, "itemCode is error");
} }
var tmpResult = await this.opJdOrder(pobj.actionBody.itemCode, itemCodeList, req); var tmpResult = await this.getPayPageAddr(pobj.actionBody.itemCode, itemCodeList, req);
// { result: true, // { result: true,
// data: // data:
// '{"success":true,"code":null,"msg":null,"data":{"orderNumber":"6058867","erpOrderId":"523198741458590844", // '{"success":true,"code":null,"msg":null,"data":{"orderNumber":"6058867","erpOrderId":"523198741458590844",
...@@ -271,7 +271,29 @@ class tmqueryCtl extends CtlBase { ...@@ -271,7 +271,29 @@ class tmqueryCtl extends CtlBase {
} }
return system.getResultSuccess() return system.getResultSuccess()
} }
async opJdOrder(itemCode, itemCodeList, req) { // async putPayOrderData() {
// var tokenInfo = await this.getToken(pushData.actionProcess);
// if (tokenInfo.status != 0) {
// return tokenInfo;
// }
// var param = {
// actionProcess: pushData.actionProcess,
// actionType: "updateOrderStatus",
// actionBody: {
// channelUserId: pushData.jdPin,
// channelItemCode: pushData.serviceCode,
// needNoOrderNo: pushData.orderId,
// buyerMoblie: pushData.mobile
// },
// isUser: "yes"
// };
// var reqUrl = this.channelApiUrl + "/action/tmOrder/springBoard";
// var resultUser = await this.execClient.execPostTK(param, reqUrl, tokenInfo.data.token);
// if (!resultUser) {
// return system.getResult(null, "req error");
// }
// }
async getPayPageAddr(itemCode, itemCodeList, req) {
try { try {
const { Signer, Context } = require('../jd-gateway-sdk'); const { Signer, Context } = require('../jd-gateway-sdk');
...@@ -372,7 +394,7 @@ class tmqueryCtl extends CtlBase { ...@@ -372,7 +394,7 @@ class tmqueryCtl extends CtlBase {
return { success: false, code: -200, msg: errorMsg.stack }; return { success: false, code: -200, msg: errorMsg.stack };
} }
} }
async pushJdOrder(pushData, req) {//处理京东推送的订单信息 async pushPayOrder(pushData, req) {//处理京东推送的订单信息
try { try {
var signResult = await this.createSign(pushData, "6B876EB84731E166D76E1F73AD5764BA", true); var signResult = await this.createSign(pushData, "6B876EB84731E166D76E1F73AD5764BA", true);
if (signResult.status != 0) { if (signResult.status != 0) {
......
...@@ -32,7 +32,7 @@ module.exports = function (app) { ...@@ -32,7 +32,7 @@ module.exports = function (app) {
// clientIp: "" // clientIp: ""
// }); // });
req.query.actionProcess = "jd"; req.query.actionProcess = "jd";
var result = await tmqueryCtl.pushJdOrder(req.query, req); var result = await tmqueryCtl.pushPayOrder(req.query, req);
// oplogCtl.info({ // oplogCtl.info({
// optitle: "############################################操作订单结果.................orderNotify", // optitle: "############################################操作订单结果.................orderNotify",
// op: "/jd/orderNotify", // op: "/jd/orderNotify",
......
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