Commit 019be54d by 王栋源

wdy

parent 27f075a5
......@@ -40,6 +40,11 @@ class OpNeed extends APIBase {
case "opNeedDetailByChannelNo"://需求详情--包含方案
opResult = await this.utilsOpNeedSve.opNeedDetailByChannelNo(pobj, pobj.actionBody);
break;
case "getItemByNeedNo"://需求详情
opResult = await this.utilsOpNeedSve.getItemByNeedNo(pobj, pobj.actionBody);
break;
// case "getItemByChannelNeedNo"://方案反馈
// opResult = await this.utilsOpNeedSve.getItemByChannelNeedNo(pobj, pobj.actionBody);
// break;
......
......@@ -24,10 +24,11 @@ class UtilsOpNeedService extends AppServiceBase {
*/
async opSubmitNeed(pobj, actionBody) {
var sobj = pobj;
if (actionBody.type) {
// 获取商品类型
sobj.actionType = "getProductTypeInfo";
var url = settings.centerAppUrl() + "action/opProduct/springBoard";
var opResult =await this.restPostUrl(sobj,url);
var opResult = await this.restPostUrl(sobj, url);
if (opResult.status != 0) {
return system.getResultFail(-5015, "需求类型查询失败");
}
......@@ -35,6 +36,7 @@ class UtilsOpNeedService extends AppServiceBase {
pobj.actionBody.type_name = opResult.data.type_name;
pobj.actionBody.channel_type_code = opResult.data.channel_type_code;
pobj.actionBody.channel_type_name = opResult.data.channel_type_name;
}
// 提交需求 暂未做推送
pobj.actionType = "opSubmitNeed";
var reqUrl = this.centerOrderUrl + "action/opNeed/springBoard";
......@@ -55,7 +57,7 @@ class UtilsOpNeedService extends AppServiceBase {
async opNeedList(pobj, actionBody) {
// 获取需求列表
var reqUrl = this.centerOrderUrl + "action/opNeed/springBoard";
var opNeedListResult =await this.restPostUrl(pobj,reqUrl);
var opNeedListResult = await this.restPostUrl(pobj, reqUrl);
return opNeedListResult;
}
......@@ -103,6 +105,13 @@ class UtilsOpNeedService extends AppServiceBase {
return result;
}
async getNeedList(pobj, actionBody){
// pobj.
var reqUrl = this.centerOrderUrl + "action/need/springBoard";
var result = await this.restPostUrl(pobj, reqUrl);
return result;
}
//状态更新
async icpNotify(pobj) {
var actionBody = pobj.actionBody;
......@@ -287,12 +296,10 @@ class UtilsOpNeedService extends AppServiceBase {
}
return jsonarr;
}
// async test1() {
// var a = await this.aliclient.reqbyget({ action: "CloseIntention", reqbody: { BizId: "20200416125415000001", Note: "测试需求关闭" }, apiVersion: "2019-05-08" });
// console.log(a.data);
// return a;
// }
//  async opNeedDetailByChannelNo(pobj, actionBody){
// }
}
module.exports = UtilsOpNeedService;
......
......@@ -2,6 +2,7 @@
1. [下需求](#opSubmitNeed)
2. [需求关闭](#opNeedClose)
3. [需求列表](#opNeedList)
4. [需求详情](#getItemByNeedNo)
## **<a name="opSubmitNeed"> 下需求</a>**
[返回到目录](#menu)
......@@ -10,24 +11,43 @@
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:opSubmitNeed
|参数名 | 必须 | 字段类型 | 说明 |
| ---- | ---- | ---- | ---- |
|userName | Y | string | 用户名称 |
|area | N | string | 地区名称 |
|description | Y | string | 备注 |
|mobile | Y | string | 用户电话 |
|type | Y | int | 产品类型 |
``` javascript
{
{
"actionType":"opSubmitNeed",
"actionBody":{
"area": "北京市-北京市-大兴区",
"description": "公司注册 - ",
"mobile": "13911391996",
"type": "gszc",
"userName": ""
}
}
```
|参数名 | 字段类型 | 说明 |
| ---- | ---- | ---- |
|needNo | string | 需求号 |
#### 返回结果
``` javascript
{
"status": 0,
"msg": "success",
"data": null,
"requestId": "d8ff1ec957e8473f863e79ad91440c60"
}
"data": {
"needNo": "N202008120920C5NEHz9",
},
"requestId": "5579e010573b430ebf4b456156061081"
}
```
## **<a name="opNeedClose"> 需求关闭</a>**
......@@ -37,11 +57,20 @@
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:opNeedClose
|参数名 | 必须 | 字段类型 | 说明 |
| ---- | ---- | ---- | ---- |
|needNo | Y | string | 需求号|
|note | N | string | 备注|
``` javascript
{
"needNo": "N202008081803V5zoAk4", // 必填
"note":"不想买了" // 必填
"actionType":"opNeedClose",
"actionBody":{
"needNo": "N202008120920C5NEHz9",
"note":"不想买了"
}
}
```
#### 返回结果
......@@ -61,10 +90,24 @@
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:opNeedList
| 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- |
| pageNumber | 否 | string | 页码 |
| pageSize | 否 | string | 页面大小 |
| status | 否 | string | 状态 |
| consultType | 否 | string | 需求类型 |
``` javascript
{
// 时间段,分页,排序,需求状态 条件展示未做
{
"actionType":"opNeedList",
"actionBody":{
"pageNumber":"1",
"pageSize":"10",
"consultType":"gszc"
}
}
```
#### 返回结果
......@@ -72,20 +115,134 @@
// 返回字段需要根据原型来做,目前只返回基础数据
{
"status": 0,
"msg": "操作成功",
"data": [
"msg": "success",
"data": {
"count": 2,
"rows": [
{
"needNo": "N202008081803V5zoAk4",
"status": "ygb",
"statusName": "已关闭"
"id": 2846,
"uapp_id": 22,
"channelNeedNo": "N202008111937PK2R1ld",
"needNo": "N202008111937PK2R1ld",
"channelUserId": "15010929366",
"publishName": "",
"publisherOnlyCode": null,
"publishContent": "公司注册 - ",
"publishMobile": "13911391996",
"followManUserId": null,
"followManName": null,
"followManMobile": null,
"followManOnlyCode": null,
"followContent": null,
"productOneType_id": null,
"productType_id": null,
"notes": null,
"disposeNotes": null,
"statusName": "未推送",
"status": "wts",
"city": "北京市-北京市-大兴区",
"province": null,
"typeCode": "gszc",
"typeName": "公司注册",
"channelTypeCode": "gszc",
"channelTypeName": "公司注册",
"created_at": "2020-08-11T11:37:48.000Z",
"updated_at": "2020-08-11T11:37:48.000Z",
"deleted_at": null,
"version": 0
},
{
"needNo": "N202008081637iFxoxrE",
"id": 2845,
"uapp_id": 22,
"channelNeedNo": "N202008111825jPFPjyw",
"needNo": "N202008111825jPFPjyw",
"channelUserId": "15010929366",
"publishName": "",
"publisherOnlyCode": null,
"publishContent": "公司注册 - ",
"publishMobile": "13911391996",
"followManUserId": null,
"followManName": null,
"followManMobile": null,
"followManOnlyCode": null,
"followContent": null,
"productOneType_id": null,
"productType_id": null,
"notes": null,
"disposeNotes": null,
"statusName": "未推送",
"status": "wts",
"statusName": "未推送"
"city": "北京市-北京市-大兴区",
"province": null,
"typeCode": "gszc",
"typeName": "公司注册",
"channelTypeCode": "gszc",
"channelTypeName": "公司注册",
"created_at": "2020-08-11T10:25:26.000Z",
"updated_at": "2020-08-11T10:25:26.000Z",
"deleted_at": null,
"version": 0
}
],
"bizmsg": "empty",
"requestId": "c1e67d2f7eb7416b988f60ce0c93559b"
]
},
"requestId": "ffe3d8ad5ea246bc81ee8d93c6bb0c6e"
}
```
## **<a name="opNeedList"> 需求详情</a>**
[返回到目录](#menu)
##### URL
[/web/action/opNeed/springBoard]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getItemByNeedNo
| 参数名 | 必填 | 类型 | 描述 |
| ---- | ---- | ---- | ---- |
| needNo | 是 | string | 需求号 |
``` javascript
{
"actionType":"getItemByNeedNo",
"actionBody":{
"needNo": "N202008120920C5NEHz9"
}
}
```
#### 返回结果
``` javascript
// 返回字段需要根据原型来做,目前只返回基础数据
{
"status": 0,
"msg": "success",
"data": {
"id": 2848,
"uapp_id": 22,
"needNo": "N202008120920C5NEHz9",
"channelNeedNo": "N202008120920C5NEHz9",
"channelUserId": "15010929366",
"followManUserId": null,
"followManMobile": null,
"city": "北京市-北京市-大兴区",
"province": null,
"publishContent": "公司注册 - ",
"publishName": "",
"publishMobile": "13911391996",
"notes": null,
"followContent": null,
"disposeNotes": null,
"status": "ygb",
"typeCode": "gszc",
"typeName": "公司注册",
"channelTypeCode": "gszc",
"channelTypeName": "公司注册",
"publisherOnlyCode": null,
"followManName": null,
"followManOnlyCode": null
},
"requestId": "b8c105d8015b4d1eb9fd3c016ca7b21f"
}
```
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