Commit 9d5ccd74 by 庄冰

关闭icp订单

parent 508c93e9
...@@ -110,6 +110,11 @@ class Need extends APIBase { ...@@ -110,6 +110,11 @@ class Need extends APIBase {
case "icpOrderClose"://关闭ICP订单 case "icpOrderClose"://关闭ICP订单
opResult = await this.utilsNeedSve.icpOrderClose(pobj, pobj.actionBody); opResult = await this.utilsNeedSve.icpOrderClose(pobj, pobj.actionBody);
break; break;
case "getSolutionByChannelOrderNo"://根据渠道订单获取方案信息
opResult = await this.utilsNeedSve.getSolutionByChannelOrderNo(pobj, pobj.actionBody);
// opResult = await this.utilsNeedSve.getItemByChannelSolutionNo(pobj, pobj.actionBody);
// break;
break;
//-----------接入百度ICP------end---------------------------------- //-----------接入百度ICP------end----------------------------------
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
......
...@@ -202,6 +202,19 @@ class UtilsNeedService extends AppServiceBase { ...@@ -202,6 +202,19 @@ class UtilsNeedService extends AppServiceBase {
return itemResult; return itemResult;
} }
/** /**
* 获取方案详情
* @param {*} pobj
* @param {*} actionBody bizId 渠道方案号
*/
async getSolutionByChannelOrderNo(pobj, actionBody) {
if (!actionBody.orderNo) {
return system.getResult(null, "actionBody.orderNo can not be empty,100390");
}
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var itemResult = await this.restPostUrl(pobj, reqUrl);
return itemResult;
}
/**
* 关闭需求 * 关闭需求
* @param {*} pobj * @param {*} pobj
* @param {*} actionBody * @param {*} actionBody
...@@ -1438,15 +1451,16 @@ class UtilsNeedService extends AppServiceBase { ...@@ -1438,15 +1451,16 @@ class UtilsNeedService extends AppServiceBase {
} }
//关闭icp订单 //关闭icp订单
async icpOrderClose(pobj) { async icpOrderClose(pobj) {
var actionBody = pobj; var actionBody = pobj.actionBody;
var self = this; var self = this;
var url = settings.centerOrderUrl() + "action/qcapi/springBoard"; var url = settings.centerOrderUrl() + "action/qcapi/springBoard";
var rtn = await this.restPostUrl(pobj, url); var rtn = await this.restPostUrl(pobj, url);
if (rtn.status == 0 && rtn.data) { if (rtn.status == 0 && rtn.data) {
pobj.actionBody.orderNo = rtn.data.orderNo; pobj.actionBody.orderNo = rtn.data.orderNo;
var orderrtn = await self.utilsOrderSve.delOrder(pobj, pobj); pobj.actionType="delOrder";
var orderrtn = await self.utilsOrderSve.delOrder(pobj, actionBody);
if (orderrtn.status < 0) { if (orderrtn.status < 0) {
// return system.getResultFail(-5022, "订单关闭失败"); return system.getResultFail(-5022, "订单关闭失败");
} }
var tmpObj = { var tmpObj = {
actionBody: { actionBody: {
......
...@@ -19,6 +19,7 @@ module.exports = { ...@@ -19,6 +19,7 @@ module.exports = {
"putUserPwdByMobile", "icpNotifyNew" "putUserPwdByMobile", "icpNotifyNew"
], ],
apiMustUserpinList: [ apiMustUserpinList: [
"icpOrderClose",
"submitNeed", "paySuccess", "icpNotify", "getLoginInfo", "icpNotifyNew", "submitIcpProgramme","serviceProviderSubmitMaterial","abolishIcpProgramme", "submitNeed", "paySuccess", "icpNotify", "getLoginInfo", "icpNotifyNew", "submitIcpProgramme","serviceProviderSubmitMaterial","abolishIcpProgramme",
"submitService","serviceProviderNotification", "submitService","serviceProviderNotification",
"ncServiceSubmitOption", "ncSubmitSolution", "ncCloseNeed", "ncWriteCommunicationRecord", "ncGetCommunicationRecord", "rtServiceSubmitOption", "rtSubmitSolution", "ncServiceSubmitOption", "ncSubmitSolution", "ncCloseNeed", "ncWriteCommunicationRecord", "ncGetCommunicationRecord", "rtServiceSubmitOption", "rtSubmitSolution",
......
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