Commit fa918dea by linboxuan

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

parents 8d643e32 46666f1c
...@@ -60,6 +60,9 @@ class FgbusinesschanceAPI extends WEBBase { ...@@ -60,6 +60,9 @@ class FgbusinesschanceAPI extends WEBBase {
case "getMoreInfoUrl":// 更多客户信息链接地址 case "getMoreInfoUrl":// 更多客户信息链接地址
opResult = await this.utilsFgbusinesschancSve.getMoreInfoUrl(pobj, pobj.actionBody); opResult = await this.utilsFgbusinesschancSve.getMoreInfoUrl(pobj, pobj.actionBody);
break break
case "getConsultingRecord":// 根据咨询公司名称获取咨询记录
opResult = await this.utilsFgbusinesschancSve.getConsultingRecord(pobj, pobj.actionBody);
break
default: default:
opResult = system.getResult(null, "action_type参数错误"); opResult = system.getResult(null, "action_type参数错误");
break; break;
......
...@@ -152,8 +152,9 @@ class UtilsFgbusinesschancService extends AppServiceBase { ...@@ -152,8 +152,9 @@ class UtilsFgbusinesschancService extends AppServiceBase {
"productName": val.goods_name,//购买产品名称 "productName": val.goods_name,//购买产品名称
"orderAmount": val.contract_amount,//订单金额 "orderAmount": val.contract_amount,//订单金额
"createTime": val.purchase_date,//购买日期 "createTime": val.purchase_date,//购买日期
"companyName": val.company_name, "companyName": val.company_name,//公司名称
"statusName": "已完成"//购买状态名称 "customerName": val.customer_name,//客户姓名
"num": val.num
}); });
} }
} }
...@@ -213,6 +214,23 @@ class UtilsFgbusinesschancService extends AppServiceBase { ...@@ -213,6 +214,23 @@ class UtilsFgbusinesschancService extends AppServiceBase {
}) })
} }
async getConsultingRecord(pobj, actionBody) {
if (!actionBody.companyName) {
return system.getResult(null, "actionBody.companyName can not be empty,100290");
}
var url = settings.entProfileUrl() + "gsb/api/consultingRecord";
var reqParam = {
company_name: actionBody.companyName
}
var result = await this.restPostWithHValueUrl(reqParam, url);
let code = result.code || result.status
if (code !== 200 && code !== 0) {
return system.getResult(null, result.message || result.msg || "req is error");
}
return system.getResultSuccess(result.data);
}
} }
module.exports = UtilsFgbusinesschancService; module.exports = UtilsFgbusinesschancService;
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
1. [写入在线产品表](#i) 1. [写入在线产品表](#i)
1. [写入订单退款表](#j) 1. [写入订单退款表](#j)
1. [写入支付表和订单详情表](#k) 1. [写入支付表和订单详情表](#k)
1. [根据咨询公司名称获取咨询记录](#l)
## **<a name="a"> 获取营销话术</a>** ## **<a name="a"> 获取营销话术</a>**
[返回到目录](#menu) [返回到目录](#menu)
...@@ -358,8 +360,8 @@ ...@@ -358,8 +360,8 @@
"source": "阿里云",//购买渠道 "source": "阿里云",//购买渠道
"productName": "公司注册",//购买产品名称 "productName": "公司注册",//购买产品名称
"orderAmount": 680,//订单金额 "orderAmount": 680,//订单金额
"createTime":"2019-12-12",//购买日期 "createTime":"2019-12-12",//购买日期
"statusName": "已完成"//购买状态名称 "customerName": "客户名称"// 客户名称
}], }],
"requestId": "f21446617c5e46ad889f3fab7bb69456" "requestId": "f21446617c5e46ad889f3fab7bb69456"
} }
...@@ -530,4 +532,57 @@ ...@@ -530,4 +532,57 @@
"data":null, "data":null,
"requestId": "f21446617c5e46ad889f3fab7bb69456" "requestId": "f21446617c5e46ad889f3fab7bb69456"
} }
```
## **<a name="l">根据咨询公司名称获取咨询记录</a>**
[返回到目录](#menu)
##### URL
[/api/opaction/fgbusinesschance/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求头中需要增加token的值
#### 渠道执行的类型 actionType:getConsultingRecord
#### 请求数据
```
{
"actionType":"getConsultingRecord",
"actionBody":{
"companyName":"中联恒顺商贸有限公司" //公司名称
}
}
```
#### 返回结果
```
{
"status": 0,// 0为成功,否则失败
"msg": "success",
"data":[
{
"channel": "个人挖掘", //渠道
"consult_product": "软件著作权转让(国内)", //咨询产品
"consult_time": "2019-12-20 11:40:12", //咨询时间
"customer_address": "北京市-北京市-北京市", //客户地区
”customer_name“:"无", //客户姓名
"id":"5ef854671f20452d18943075" // 咨询id
},
{
"channel": "百度",
"consult_product": "内资公司变更",
"consult_time": "2019-04-03 15:13:46",
"customer_address": "北京市-北京市-朝阳区",
”customer_name“:"客户姓名", //客户姓名
"id":"咨询id" // 咨询id
}
],
"requestId": "f21446617c5e46ad889f3fab7bb69456"
}
``` ```
\ 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