Commit b5ad768d by 庄冰

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

Merge branch 'igirl-channel-gateway' of gitlab.gongsibao.com:jiangyong/zhichan into igirl-channel-gateway
parents c96473cc 145dc209
......@@ -610,48 +610,56 @@ class UtilsNeedSve extends AppServiceBase {
}
// 引用属性,channel依赖bizId order依赖intentionBizId
pobj.intentionBizId = pobj.bizId
var sobj = {
"actionType": "getItemByChannelSolutionNo",
"actionBody": pobj
}
// getItemByChannelSolutionNo
var url = settings.centerChannelUrl() + "/api/opreceive/need/springBoard";
var token = tokenInfo.data.token;
var result = await this.execlient.execPostTK(sobj, url, token);
if (result.status != 0) {
return {
"requestId": result.requestId,
"success": false,
"errorMsg": result.msg,
"errorCode": "ok"
};
}
// 获取userpin
var userparam = {
actionType: "getLoginByUserName",
actionBody: {
"channelUserId": result.data.channelUserId,
"mobile": result.data.publishMobile,
"userName": result.data.publishMobile
}
actionBody: {}
};
if (pobj.isDirectBuy === "true"){//直购
userparam.actionBody.channelUserId = pobj.mobile
userparam.actionBody.mobile = pobj.mobile
userparam.actionBody.userName = pobj.mobile
pobj.publishMobile = pobj.mobile
pobj.channelTypeCode = pobj.bizId.startsWith("EDI")?7:5;
pobj.province = pobj.companyLocation+`(${pobj.actionType})`
}else {
var sobj = {
"actionType": "getItemByChannelSolutionNo",
"actionBody": pobj
}
// getItemByChannelSolutionNo
var url = settings.centerChannelUrl() + "/api/opreceive/need/springBoard";
var token = tokenInfo.data.token;
var result = await this.execlient.execPostTK(sobj, url, token);
if (result.status != 0) {
return {
"requestId": result.requestId,
"success": false,
"errorMsg": result.msg,
"errorCode": "ok"
};
}
userparam.actionBody.channelUserId = result.data.channelUserId
userparam.actionBody.mobile = result.data.publishMobile
userparam.actionBody.userName = result.data.publishMobile
pobj.publishMobile = result.data.publishMobile;
pobj.channelNeedNo = result.data.channelNeedNo;
pobj.needNo = result.data.needNo;
pobj.channelTypeCode = result.data.channelTypeCode;
pobj.province = result.data.solutionProvince;//北京(新购)?
}
var url = settings.centerChannelUrl() + "/api/opreceive/accessAuth/springBoard";
var userpinResultTmp = await this.execlient.execPostTK(userparam, url, tokenInfo.data.token);
if (userpinResultTmp.status != 0) {
return {
"requestId": result.requestId,
"requestId": userpinResultTmp.requestId,
"success": false,
"errorMsg": result.msg,
"errorMsg": userpinResultTmp.msg,
"errorCode": "ok"
};
}
// icpNotify
var url = settings.centerChannelUrl() + "/api/opreceive/need/springBoard";
pobj.publishMobile = result.data.publishMobile;
pobj.channelNeedNo = result.data.channelNeedNo;
pobj.needNo = result.data.needNo;
pobj.channelTypeCode = result.data.channelTypeCode;
pobj.province = result.data.solutionProvince;
var sobj = {
"actionType": "icpNotify",
"actionBody": pobj
......
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