Commit 3e2d9781 by linboxuan

Merge branch 'center-channel' of http://gitlab.gongsibao.com/jiangyong/zhichan into center-channel

parents c3953e8c 31f344d5
......@@ -25,6 +25,9 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if (!Array.isArray(actionBody.businessData)) {
return system.getResult(null, "actionBody.businessData should be Array,100290");
}
if (actionBody.businessType === "关联推荐" && !actionBody.customerType) {
return system.getResult(null, "关联推荐时,customerType不能为空");
}
var self = this;
var reqUrl = this.centerOrderUrl + "action/fgbusinesschance/springBoard";
......@@ -116,7 +119,14 @@ class UtilsFgbusinesschancService extends AppServiceBase {
if (code !== 200 && code !== 0) {
return system.getResult(null, result.message || result.msg || "req is error");
}
return system.getResultCustomSuccess(actionBody.businessType === "智能监测" ? { data: result.data, survey_reason: result.survey_reason } : { data: result.data });
let data = { data: result.data };
if (actionBody.businessType === "智能监测") {
data = { data: result.data, survey_reason: result.survey_reason || [] }
}
if (actionBody.businessType === "关联推荐") {
data = { data: result.data, relational_reason: result.relational_reason || [] }
}
return system.getResultCustomSuccess(data);
}
async getOldOrder(pobj, actionBody) {
......
......@@ -451,32 +451,4 @@ module.exports = function (app) {
});
//-----------------------新的模式---------api---------结束
//--------------------------起名宝------------------------------------//
app.post('/name/:gname/:qname/:method', function (req, res) {
var classPath = req.params["qname"];
var methodName = req.params["method"];
var gname = req.params["gname"];
var params = [];
classPath = gname + "." + classPath;
var tClientIp = system.get_client_ip(req);
req.clientIp = tClientIp;
req.uagent = req.headers["user-agent"];
req.classname = classPath;
params.push(gname);
params.push(methodName);
params.push(req.body)
params.push(req.query);
params.push(req);
var p = null;
var invokeObj = system.getObject("api." + classPath);
if (invokeObj["doexecMethod"]) {
p = invokeObj["doexecMethod"].apply(invokeObj, params);
}
p.then(r => {
res.end(JSON.stringify(r));
});
});
};
\ No newline at end of file
......@@ -310,7 +310,8 @@
"msg": "success",
"survey_reason":[
{'change_item': '住所', 'change_time': '2020-03-24', 'change_text': '【北京市海淀区巨山路78号院209室】变更为【北京市海淀区信息路28号1幢10层1003-12室】'}
] // 备注 : 只有类型 智能监测 该字段才出现
] ,// 备注 : 只有类型 智能监测 该字段才出现
"relational_reason":["公司所属行业类型:互联网和相关服务业"] // 备注:只有类型为关联推荐时出现
"data":[{
"accountId":"客户ID",
"recommendId": "00000001",//推荐唯一码
......@@ -388,13 +389,13 @@
actionBody:{
businessData:[
{
"companyId":"111111100001",//公司唯一码
"companyId":"111111100001",//公司唯一码
"companyName": "公司名称",
"businessId": "商机唯一码",
createTime":"2019-12-12"
},
{
"companyId":"111111100001",//公司唯一码
"companyId":"111111100001",//公司唯一码
"companyName": "公司名称",
"businessId": "商机唯一码",
createTime":"2019-12-12"
......
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