Commit c236fd20 by 刘泽奇

Merge branch 'igirl-channel-jdweb' of gitlab.gongsibao.com:jiangyong/zhichan…

Merge branch 'igirl-channel-jdweb' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel-jdweb
parents 2068f98d 80848f10
...@@ -263,35 +263,35 @@ class tmqueryCtl extends CtlBase { ...@@ -263,35 +263,35 @@ class tmqueryCtl extends CtlBase {
console.log(payDataResult, "payDataResult...........payDataResult........$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..002.."); console.log(payDataResult, "payDataResult...........payDataResult........$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$..002..");
if (payDataResult && payDataResult.success && payDataResult.success == true) { if (payDataResult && payDataResult.success && payDataResult.success == true) {
//更新订单信息 //更新订单信息
await this.putPayOrderData(pobj, orderResult, payDataResult, req);
return system.getResultSuccess({ payUrl: payDataResult.data.returnUrl }); return system.getResultSuccess({ payUrl: payDataResult.data.returnUrl });
}//成功 }//成功
} }
return system.getResult(null, "pay page is error"); return system.getResult(null, "pay page is error");
} }
return system.getResultSuccess() return system.getResultSuccess();
} }
async putPayOrderData() { async putPayOrderData(pobj, orderResult, payDataResult, req) {
var tokenInfo = await this.getToken(pushData.actionProcess); var tokenInfo = await this.getToken(pobj.actionProcess);
if (tokenInfo.status != 0) { if (tokenInfo.status != 0) {
return tokenInfo; return tokenInfo;
} }
var param = { var param = {
actionProcess: pushData.actionProcess, actionProcess: pobj.actionProcess,
actionType: "updateOrderStatus", actionType: "updateOrderStatus",
actionBody: { actionBody: {
channelUserId: pushData.jdPin, channelUserId: req.session.userPinInfo.channelUserId,
channelItemCode: pushData.serviceCode, orderNo: orderResult.data.orderNo,
needNoOrderNo: pushData.orderId, channelServiceNo: payDataResult.data.erpOrderId,
buyerMoblie: pushData.mobile needNo: pobj.actionBody.itemCode + "_" + payDataResult.data.orderNumber,
needNoOrderNo: payDataResult.data.orderNumber
}, },
isUser: "yes" isUser: "yes"
}; };
console.log(param, "putPayOrderData########################################333333...........................");
var reqUrl = this.channelApiUrl + "/action/tmOrder/springBoard"; var reqUrl = this.channelApiUrl + "/action/tmOrder/springBoard";
var resultUser = await this.execClient.execPostTK(param, reqUrl, tokenInfo.data.token); var tmp = await this.execClient.execPostTK(param, reqUrl, tokenInfo.data.token);
if (!resultUser) { console.log(tmp, "putPayOrderData########################################333333..........tmptmptmptmp.................");
return system.getResult(null, "req error");
}
} }
async getPayPageAddr(itemCode, itemCodeList, req) { async getPayPageAddr(itemCode, itemCodeList, req) {
try { try {
...@@ -417,12 +417,13 @@ class tmqueryCtl extends CtlBase { ...@@ -417,12 +417,13 @@ class tmqueryCtl extends CtlBase {
return tokenInfo; return tokenInfo;
} }
var param = {}; var param = {};
if (pushData.serviceCode == "FW_GOODS-581976") { if (pushData.skuId == "FW_GOODS-581976-1") {
param = { param = {
actionProcess: pushData.actionProcess, actionProcess: pushData.actionProcess,
actionType: "updateOrderPayStatus", actionType: "updateOrderPayStatus",
actionBody: { actionBody: {
channelUserId: pushData.jdPin, channelUserId: pushData.jdPin,
payStatus: "yfk",
channelItemCode: pushData.serviceCode, channelItemCode: pushData.serviceCode,
needNoOrderNo: pushData.orderId, needNoOrderNo: pushData.orderId,
buyerMoblie: pushData.mobile buyerMoblie: pushData.mobile
...@@ -437,6 +438,7 @@ class tmqueryCtl extends CtlBase { ...@@ -437,6 +438,7 @@ class tmqueryCtl extends CtlBase {
actionType: "addOrderAndDelivery", actionType: "addOrderAndDelivery",
actionBody: { actionBody: {
channelUserId: pushData.jdPin, channelUserId: pushData.jdPin,
needNo: pushData.skuId + "_" + pushData.orderId,
needNoOrderNo: pushData.orderId, needNoOrderNo: pushData.orderId,
buyerMoblie: pushData.mobile buyerMoblie: pushData.mobile
}, },
......
...@@ -31,6 +31,7 @@ class ExecClient { ...@@ -31,6 +31,7 @@ class ExecClient {
var requestId = this.getUUID(); var requestId = this.getUUID();
var cmd = this.cmdJDPostTK.replace(/\{data\}/g, var cmd = this.cmdJDPostTK.replace(/\{data\}/g,
data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token); data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token);
console.log(cmd);
return cmd; return cmd;
} }
async execPostTK(subData, url, token) { async execPostTK(subData, url, token) {
...@@ -50,6 +51,7 @@ class ExecClient { ...@@ -50,6 +51,7 @@ class ExecClient {
var requestId = this.getUUID(); var requestId = this.getUUID();
var cmd = this.cmdPostTK.replace(/\{data\}/g, var cmd = this.cmdPostTK.replace(/\{data\}/g,
data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token).replace(/\{requestId\}/g, requestId); data).replace(/\{url\}/g, url).replace(/\{tk\}/g, token).replace(/\{requestId\}/g, requestId);
console.log(cmd);
return cmd; return cmd;
} }
async exec(cmd) { async exec(cmd) {
......
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