Commit 3658d1fb by 宋毅

新接口

parent 624bb99b
......@@ -13,11 +13,13 @@ class IcpNeedService extends AppServiceBase {
if (!pobj.intentionBizId) {
return system.getResult(null, "actionBody.intentionBizId can not be empty,6000001");
}
let sobj = pobj;
sobj.actionBody = {type: pobj.consultType};
sobj.actionType = "getProductTypeInfo";
let productTypeParams = {
actionType: "getProductTypeInfo",
appInfo: pobj.appInfo,
actionBody: {type: pobj.consultType}
}
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) {
return system.getResultFail(-5015, "需求类型查询失败,6000002");
}
......@@ -25,18 +27,6 @@ class IcpNeedService extends AppServiceBase {
if (productItem.status != 0) {
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.idempotentSource = "baidu_icp";
......@@ -84,11 +74,34 @@ class IcpNeedService extends AppServiceBase {
// pobj.actionBody.idempotentSource = "yiming.ediwz";
// }
// }
pobj.actionBody.level = "A";
pobj.actionType = "submitNeed";
console.log("submitNeed--------------------------params----", JSON.stringify(pobj));
let submitNeedParams = {
actionType: "submitNeed",
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 result = await this.restPostUrl(pobj, reqUrl);
let result = await this.restPostUrl(submitNeedParams, reqUrl);
if (result.status == 0) {
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