Commit 9d5ccd74 by 庄冰

关闭icp订单

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