Commit 3658d1fb by 宋毅

新接口

parent 624bb99b
...@@ -13,11 +13,13 @@ class IcpNeedService extends AppServiceBase { ...@@ -13,11 +13,13 @@ class IcpNeedService extends AppServiceBase {
if (!pobj.intentionBizId) { if (!pobj.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,6000001"); return system.getResult(null, "actionBody.intentionBizId can not be empty,6000001");
} }
let sobj = pobj; let productTypeParams = {
sobj.actionBody = {type: pobj.consultType}; actionType: "getProductTypeInfo",
sobj.actionType = "getProductTypeInfo"; appInfo: pobj.appInfo,
actionBody: {type: pobj.consultType}
}
let url = settings.centerAppUrl() + "action/opProduct/springBoard"; let url = settings.centerAppUrl() + "action/opProduct/springBoard";
let rtn = await this.execClient.execPost(sobj, url); let rtn = await this.execClient.execPost(productTypeParams, url);
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
return system.getResultFail(-5015, "需求类型查询失败,6000002"); return system.getResultFail(-5015, "需求类型查询失败,6000002");
} }
...@@ -25,18 +27,6 @@ class IcpNeedService extends AppServiceBase { ...@@ -25,18 +27,6 @@ class IcpNeedService extends AppServiceBase {
if (productItem.status != 0) { if (productItem.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败6000003"); return system.getResultFail(-5015, "需求类型查询失败6000003");
} }
pobj.actionBody = {
service_product_id: productItem.data.service_product_id,
productId: productItem.data.service_product_id,
appName: pobj.appInfo.app_name,
type_code: productItem.data.type_code,
type_name: productItem.data.type_name,
channel_type_code: productItem.data.channel_type_code,
channel_type_name: productItem.data.channel_type_name,
type: pobj.consultType || pobj.channel_type_code,
idempotentId: pobj.intentionBizId,
idempotentSourceName: pobj.appInfo.app_name
}
// pobj.actionBody.type = "baidu.icp"; // pobj.actionBody.type = "baidu.icp";
// pobj.actionBody.idempotentSource = "baidu_icp"; // pobj.actionBody.idempotentSource = "baidu_icp";
...@@ -84,11 +74,34 @@ class IcpNeedService extends AppServiceBase { ...@@ -84,11 +74,34 @@ class IcpNeedService extends AppServiceBase {
// pobj.actionBody.idempotentSource = "yiming.ediwz"; // pobj.actionBody.idempotentSource = "yiming.ediwz";
// } // }
// } // }
pobj.actionBody.level = "A"; let submitNeedParams = {
pobj.actionType = "submitNeed"; actionType: "submitNeed",
console.log("submitNeed--------------------------params----", JSON.stringify(pobj)); appInfo: pobj.appInfo,
actionBody: {
intentionBizId: pobj.intentionBizId,
phone: pobj.phone,
userName: pobj.userName,
description: pobj.description,
area: pobj.area,
consultType: pobj.consultType,
mobile: pobj.mobile,
type: pobj.consultType || pobj.channel_type_code,
service_product_id: productItem.data.service_product_id,
productId: productItem.data.service_product_id,
appName: pobj.appInfo.app_name,
type_code: productItem.data.type_code,
type_name: productItem.data.type_name,
channel_type_code: productItem.data.channel_type_code,
channel_type_name: productItem.data.channel_type_name,
idempotentId: pobj.intentionBizId,
idempotentSourceName: pobj.appInfo.app_name,
level: "A"
}
}
console.log("submitNeed--------------------------submitNeedParams----", JSON.stringify(pobj));
let reqUrl = settings.centerOrderUrl() + "action/need/springBoard"; let reqUrl = settings.centerOrderUrl() + "action/need/springBoard";
let result = await this.restPostUrl(pobj, reqUrl); let result = await this.restPostUrl(submitNeedParams, reqUrl);
if (result.status == 0) { if (result.status == 0) {
this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusinessNew"); this.utilsPushSve.business2Channel(pobj, "pushNeedICPBusinessNew");
} }
......
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