Commit 624bb99b by 宋毅

新接口

parent 25c09b7f
...@@ -21,20 +21,22 @@ class IcpNeedService extends AppServiceBase { ...@@ -21,20 +21,22 @@ class IcpNeedService extends AppServiceBase {
if (!rtn || !rtn.stdout) { if (!rtn || !rtn.stdout) {
return system.getResultFail(-5015, "需求类型查询失败,6000002"); return system.getResultFail(-5015, "需求类型查询失败,6000002");
} }
let data = JSON.parse(rtn.stdout); let productItem = JSON.parse(rtn.stdout);
if (data.status != 0) { if (productItem.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败6000003"); return system.getResultFail(-5015, "需求类型查询失败6000003");
} }
pobj.actionBody.service_product_id = data.data.service_product_id; pobj.actionBody = {
pobj.actionBody.productId = data.data.service_product_id; service_product_id: productItem.data.service_product_id,
pobj.actionBody.appName = pobj.appInfo.app_name; productId: productItem.data.service_product_id,
pobj.actionBody.type_code = data.data.type_code; appName: pobj.appInfo.app_name,
pobj.actionBody.type_name = data.data.type_name; type_code: productItem.data.type_code,
pobj.actionBody.channel_type_code = data.data.channel_type_code; type_name: productItem.data.type_name,
pobj.actionBody.channel_type_name = data.data.channel_type_name; channel_type_code: productItem.data.channel_type_code,
pobj.actionBody.type = pobj.consultType || pobj.channel_type_code; channel_type_name: productItem.data.channel_type_name,
pobj.actionBody.idempotentId = pobj.intentionBizId; type: pobj.consultType || pobj.channel_type_code,
pobj.actionBody.idempotentSourceName = pobj.appInfo.app_name; 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";
...@@ -82,9 +84,9 @@ class IcpNeedService extends AppServiceBase { ...@@ -82,9 +84,9 @@ class IcpNeedService extends AppServiceBase {
// pobj.actionBody.idempotentSource = "yiming.ediwz"; // pobj.actionBody.idempotentSource = "yiming.ediwz";
// } // }
// } // }
pobj.actionBody.level = "A"; pobj.actionBody.level = "A";
pobj.actionType = "submitNeed"; pobj.actionType = "submitNeed";
console.log("submitNeed--------------------------params----", 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(pobj, reqUrl);
if (result.status == 0) { if (result.status == 0) {
...@@ -92,7 +94,6 @@ class IcpNeedService extends AppServiceBase { ...@@ -92,7 +94,6 @@ class IcpNeedService extends AppServiceBase {
} }
return result; return result;
} }
} }
module.exports = IcpNeedService; module.exports = IcpNeedService;
\ No newline at end of file
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