Commit 624bb99b by 宋毅

新接口

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