# 客戶查詢模塊
##### 作者:未知
##### 時間:未知
##### 版本:V4.1.0
##### 修改:
|更新時間|更新人|作用|
|--|--|--|
|2020- 04- 22| 黃文榕 | 新增接口/findcontactbytagall |
|2020- 05- 05| 李小琳 | 新增 手動錄入查詢列表接口/getManualTaskList、手動錄入查詢任務詳情接口/getManualTaskDetail、刪除手動錄入主任務 /delManualTask、刪除手動錄入任務詳情 /delManualTaskDetail |
|2020- 05- 19| 黃文榕 |更新 接口/findcontactbytagall
|2020- 05- 22| 李小琳 |新增 接口 /wechat_api/customer/addManualTaskBeforeAddFriend |
## **Web端交互**
> *****

## **API相關文檔**
> *****
接口描述 | **客戶查詢**
---|---
URL | /wechat\_api/customer/customerPage
請求方式 | get
請求參數 |{customerName=&customerPhone=&tagIds=&beginTime=&endTime=&remarks=&limit=10&pageNo=1}
返回值 | {"code":200,"data":[],"pageNo":1,"count":0}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | customerName| string | Y |客戶名
| 請求參數 | customerPhone| string | Y |客戶手機號
| 請求參數 | tagIds| string | Y |標簽ID
| 請求參數 | beginTime| string | Y |開始時間
| 請求參數 | endTime| string | Y |結束時間
| 請求參數 | remarks| string | Y |備注名
| 請求參數 | limit| string | Y |分頁查詢
| 請求參數 | pageNo| string | Y |分頁查詢
> *****
接口描述 | **導出客戶資料**
---|---
URL | /wechat\_api/customer/downLoad
請求方式 | get
請求參數 | {customerName=&customerPhone=&tagIds=&beginTime=&endTime=&remarkName=&wechatUserId=&limit=10&pageNo=1}
返回值 | {"code":200,"data":[],"pageNo":1,"count":0}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | beginTime| string | Y |開始時間
| 請求參數 | endTime| string | Y |結束時間
| 請求參數 | customerName| string | Y |客戶名
| 請求參數 | customerPhone| string | Y |客戶手機號
| 請求參數 | remarkName| string | Y |備注名
| 請求參數 | wechatUserId| string | Y |微信號ID
| 請求參數 | limit和pageNo| int| Y |分頁查詢
| 請求參數 | tagIds| string | Y |標簽ID
> *****
接口描述 | **修改客戶資料**
---|---
URL | /wechat\_api/customer/updateCustomer
請求方式 | post
請求參數 | {customerPhone:"11111122222", customerName:"售前-紅海",nickName:"售前紅海", xfield1:"", remarks:"售前-紅海哥",tags:"",customerId:"3063060", wechatContactId:"19564131",isStar:""}
返回值 | {"wechatContact":{"page":{"pageNo":1,"pageSize":-1,"count":0,"content":[],"html":"<ul>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">« 上一頁</a></li>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">1</a></li>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">下一頁 »</a></li>\n<li class=\"disabled controls\"><a href=\"javascript:\">當前 <input type=\"text\" value=\"1\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(this.value,-1,'');\" onclick=\"this.select();\"/> / <input type=\"text\" value=\"-1\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,this.value,'');\" onclick=\"this.select();\"/> 條,共 0 條</a></li>\n</ul>\n<div style=\"clear:both;\"></div>","firstResult":0,"maxResults":-1},"sqlMap":{},"wechatContactId":19564131,"wechatUserId":13806,"uin":"0","userName":"wxid_8twmv8pkgvox22","nickName":"售前-紅海","headImgUrl":"http://wx.qlogo.cn/mmhead/ver_1/a7VEaKQezTBzyXcqCaHKdVwia4Zb4CTfmqz541bL2w9ClH5icRTib3OKQWGbgba0AJP19PvKebXVAcOaG7dKHfSCWfxKUpG2RIxvCIeyKgSrpY/132","remarkName":"","pYInitial":"SQHH","pYQuanPin":"shouqianhonghai","remarkPYInitial":"","remarkPYQuanPin":"","sex":"1","verifyFlag":"0","isDelete":0,"isSaving":0,"wechatUserName":"wxid_oo8w553uj5g612","contactFlag":"3","province":"","city":"","wechatUserUin":"663329897","chatRoomSettings":0,"contactType":0,"seq":"wxid_8twmv8pkgvox22","pyinitial":"SQHH","pyquanPin":"shouqianhonghai"},"code":200,"customer":{"page":{"pageNo":1,"pageSize":-1,"count":0,"content":[],"html":"<ul>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">« 上一頁</a></li>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">1</a></li>\n<li><a href=\"javascript:\" onclick=\"page(0,-1,'');\">下一頁 »</a></li>\n<li class=\"disabled controls\"><a href=\"javascript:\">當前 <input type=\"text\" value=\"1\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(this.value,-1,'');\" onclick=\"this.select();\"/> / <input type=\"text\" value=\"-1\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,this.value,'');\" onclick=\"this.select();\"/> 條,共 0 條</a></li>\n</ul>\n<div style=\"clear:both;\"></div>","firstResult":0,"maxResults":-1},"sqlMap":{},"customerId":3063060,"customerName":"售前-紅海","customerPhone":"11111122222","remarks":"售前-紅海哥","wechatContactId":19564131,"lastUpdateTime":1565164517924,"tags":"","isCust":0,"nickName":"售前紅海","xfield1":""}}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | nickName| string | Y |微信昵稱
| 請求參數 | remarks| string | Y | 客戶備注
| 請求參數 | customerName| string | Y | 客戶名
| 請求參數 | customerPhone| string | Y | 客戶手機號
| 請求參數 | tags| string | Y | 客戶標簽
| 請求參數 | customerId| string | Y |客戶ID
| 請求參數 | wechatContactId| integer| Y | 綁定的聯系人
| 請求參數 | isStar| string | Y | 是否星標好友
| 請求參數 | xfield1| string | Y | 用戶自定義字段
> *****
接口描述 | **刪除客戶**
---|---
URL | /wechat\_api/customer/delete
請求方式 | post
請求參數 | customerId:"3063253",
返回值 | {"code":200,"data":[],"pageNo":1,"count":0}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | customerId| string | Y |客戶ID
> *****
接口描述 | **查看與客戶的聊天記錄**
---|---
URL | /wechat\_api/message/getRedisMessageRecord
請求方式 | get
請求參數 | adminUserId=33726&wechatUserIds=13806&wechatContactIds=19564131&beginTime=&endTime=&limit=&pageNo=
返回值 | {"code":200,"data":[],"pageNo":1,"count":0}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | adminUserId| string | Y |管理員賬號ID
| 請求參數 | wechatUserIds| string | Y |微信號的ID
| 請求參數 | wechatContactIds| string | Y |微信聯系人ID
| 請求參數 | beginTime| string | Y |開始時間
| 請求參數 | endTime| string | Y |結束時間
| 請求參數 | limit和pageNo| string | Y |分頁
> *****
接口描述 | **添加個性稱呼**
---|---
URL | /wechat\_api/customer/batchSaveNickName
請求方式 | post
請求參數 | nickNames:{"wechatContactId":47666822,"custName":"陳佳","nickName":"陳佳"}
返回值 |{"msg":"保存成功!","code":200}
| Sort | Param | Type | required | Description |
| --- | --- | --- | --- |--- |
| 請求參數 | wechatContactId| string | Y |微信聯系人ID
| 請求參數 | custName| string | Y |客戶昵稱
| 請求參數 | nickName| string | Y |個性稱呼
> *****
### 通過標簽獲取客戶列表
- url: /wechat_api/customer/findcontactbytagAll
- 調用方式: get
#### 接口介紹:
通過標簽獲取客戶列表(可獲取子賬號的)
##### 傳參:
屬性名 | 類型| 是否必要 | 備注
---|--- |---| ---
wechatUserId | String| N | 用戶id
tagIds |String|N|標簽ID
isOffLine|Integer|isOnline不為空的話可以搜索出不在線的
```
?wechatUserId=746&tagIds=81100608
```
##### 出參:
屬性名 | 類型| 備注
---|--- | ---
code| Integer | 返回碼
msg | String | 消息
data | list |返回數據
data:
屬性名 | 類型| 備注
---|--- | ---
wechatContactId| Integer | 聯系人Id
wechatUserId| Integer | 微信號id
uin| String |uin
userName| String |userName
nickName| String |昵稱
headImgUrl| String |頭像地址
sex| String |性別
verifyFlag| String |
isDelete| Integer| 是否刪除
isSaving| Integer |是否保存
wechatUserName| String |自己的userName
wechatUserNickName| String | 自己的昵稱
adminUserId| Integer| 賬號id
customerNickName| String |個性稱呼
```
{
"code": 200,
"msg": "操作成功!",
"data":"data":?[
????????{
"wechatContactId":?1000004734,
"wechatUserId":?746,
"uin":?"0",
"userName":?"wxid\_az12gf9ugnoh22",
"nickName":?"broccoli",
"headImgUrl":?"http://wx.qlogo.cn/mmhead/ver\_1/ibiaQia8UnUtQE5I3qjTCLeYjnPhmv4qXLxVHfRIYS2UAiaeeXxWHYHme9OVp3s6hsgnPtfOPYiaRvW3nOaVS6laSJDuFzZvVmYa5VVhzILwj28I/132",
"remarkName":?"",
"remarkPYInitial":?"",
"remarkPYQuanPin":?"",
"sex":?"2",
"verifyFlag":?"0",
"isDelete":?0,
"isSaving":?null,
"memberCount":?null,
"groupId":?null,
"wechatUserName":?"wxid\_jmg3nu2goog222",
"alias":?"zzzslcn",
"contactFlag":?"3",
"province":?"",
"city":?"",
"op":?null,
"wechatUserUin":?"301965671",
"chatRoomSettings":?0,
"contactType":?0,
"seq":?"wxid\_az12gf9ugnoh22",
"groupName":?null,
"adminUserId":?11793,
"wechatUserNickName":?"你看那茶樹滿山",
"customerNickName":?null,
"pyinitial":?"BROCCOLI",
"pyquanPin":?"broccoli"
????????}
????]
}
//該接口沒有預設報錯項
```
### V4.2.0 查詢撥打電話后是否開啟彈窗
* url: /wechat_api/customer/getIsOpenAfterCall
* 調用方式:get
##### 傳參:無
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Integer| | 1開啟,0關閉
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": 0
}
~~~
### V4.2.0 更新是否開啟彈窗狀態
* url: /wechat_api/customer/updateIsOpenAfterCall
* 調用方式:post
##### 傳參:無
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| isOpen| Integer| Y | 1:開啟,0關閉 |
##### 傳參示例:
~~~
{
"isOpen":1
}
~~~
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Integer| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": null
}
~~~
### V4.2.0 導航欄撥打電話的客戶信息顯示
* url: /wechat_api/customer/getCustomerInfoByCall
* 調用方式:get
##### 傳參:無
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| phone| String| Y | 客戶手機號 |
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| | source:查詢來源,customerList:客戶資料
source定義
| 類型 | 備注 |
| --- | --- |
| 0| 無數據 |
| 1| 來源客戶資料 |
| 2| 來源[分配給我的]客戶池 |
| 3| 來源手動錄入 |
##### 出參示例:
~~~
{
"code":?200,
"msg":?"操作成功!",
"data":?{
"source":?0,
"customerList":?null
????}
}
~~~
或

或

### V4.2.0 查詢手動錄入任務列表
* url: /wechat_api/customer/getManualTaskList
* 調用方式:get
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| pageNo | Integer | N | 頁碼,默認1 |
| limit | Integer | N | 每頁限制條數,默認20 |
| adminUserId | Long | N | 查詢 賬號|
| pepartId | Long | N | 查詢部門 |
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": {
"count": 2,
"data": [
{
"adminUserId": 11855,
"realName": "hhhaaa"
},
{
"adminUserId": 12206,
"realName": "李小琳e"
}
],
"pageNo": 1,
"limit": 20
}
}
~~~
### V4.2.0 查詢手動錄入詳情
* url: /wechat_api/customer/getManualTaskDetail
* 調用方式:get
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| pageNo | Integer | N | 頁碼,默認1 |
| limit | Integer | N | 每頁限制條數,默認20 |
| adminUserId | Long | Y | 查詢當前人的任務詳情,getManualTaskList返回的adminUserId |
| company | String | N | 公司名稱 |
| customerName | String | N | 聯系人 |
| userName | String | N | 微信號 |
| dialStatus | Integer | N | 撥打狀態 0未撥打,1已撥打 |
| addStatus | Integer | N | 添加狀態 |
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
正常返回:
{
"code": 200,
"msg": "操作成功!",
"data": {
"count": 4,
"data": [
{
"customerId": 19380,
"customerName": "客戶1",
"customerPhone": "18750920000",
"address": null,
"company": "公司1",
"createTime": "2019-11-28 17:17:45",
"lastUpdateTime": "2019-11-28 17:17:45",
"nickName": "個性1",
"uin": null,
"adminUserId": 12206,
"syn": 1,
"userName": "wxid_001",
"xfield1": null,
"xfield2": null,
"xfield3": null,
"xfield4": null,
"xfield5": null,
"xfield6": null,
"xfield7": null,
"xfield8": null,
"xfield9": null,
"xfield10": null,
"dialStatus": 0,
"addStatus": 0,
"taskId": -1,
"orderNum": 3,
"tags": null,
"remarks": null
}
],
"pageNo": 1,
"limit": 20
}
}
adminUserId為空時返回的數據:
{
"code":?400,
"msg":?"指定查詢的任務詳情不能為空",
"data":?null
}
~~~
### V4.2.0 刪除手動錄入主任務
* url: /wechat_api/customer/delManualTask
* 調用方式:post
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| adminUserId| Long| Y | 刪除該人的所有錄入任務 |
##### 傳參示例:
~~~
正常返回數據
{
"adminUserId":12206
}
~~~
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": null
}
或
adminUserId為空時返回的數據:
{
"code":?400,
"msg":?"adminUserId為空",
"data":?null
}
~~~
### V4.2.0 刪除手動錄入任務詳情
* url: /wechat_api/customer/delManualTaskDetail
* 調用方式:post
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| customerId| Long| Y | 客戶池客戶信息id |
##### 傳參示例:
~~~
{
"customerId":19905
}
~~~
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": null
}
或
{
"code":?400,
"msg":?"customerId為空",
"data":?null
}
~~~
### V4.2.0添加手動錄入任務
* url: /wechat_api/customer/addManualTask
* 調用方式:post
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| customerName| String| Y | 客戶名稱 |
| customerPhone| String| Y | 聯系方式 |
| address| String| N | 地址 |
| nickName| String| N | 客戶昵稱 |
| userName| String| N | 微信號|
| company| String| N | 公司|
| tags| String| N | 標簽|
| phoneGeo| String| N | 所在地區|
| xfield1| String| N | |
| xfield2| String| N | |
| xfield3| String| N | |
| xfield4| String| N | |
| xfield5| String| N | |
| xfield6| String| N | |
| xfield7| String| N | |
| xfield8| String| N | |
| xfield9| String| N | |
| xfield10| String| N | |
| v1| String| N | |
##### 傳參示例:
~~~
{
"customerName":"ceshi",
"customerPhone":18750928186,
"phoneGeo":"廈門"
}
~~~
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": null
}
或
{
"code":?400,
"msg":?"聯系方式不能為空客戶姓名不能為空所在地區不能為空",
"data":?null
}
~~~
### V4.3.0 在手動錄入保存前添加微信號
* url: /wechat_api/customer/addManualTaskBeforeAddFriend
* 調用方式:post
##### 傳參:
| 屬性名 | 類型 | 是否必要 | 備注 |
| --- | --- | --- | --- |
| customerPhone| String| Y | 聯系方式|
| uin| Long| Y | 目標微信號|
| userName| String| Y | 聯系人手機號或alias|
| v1| String| N | v1|
##### 傳參示例:
~~~
{
"customerPhone": "18756666666",
"uin": "496768729",
"userName": 18756666666
}
~~~
##### 出參:
| 屬性名 | 類型 | 備注 |
| --- | --- | --- |
| code | Integer | 狀態碼 |
| msg | String | 消息 |
| data | Object| |
##### 出參示例:
~~~
{
"code": 200,
"msg": "操作成功!",
"data": {
"customerId": 20026,
"customerName": "",
"customerPhone": "18758888888",
"address": null,
"createTime": null,
"lastUpdateTime": null,
"nickName": null,
"userName": "3361907914657006851",
"company": null,
"adminUserId": 11855,
"xfield1": null,
"xfield2": null,
"xfield3": null,
"xfield4": null,
"xfield5": null,
"xfield6": null,
"xfield7": null,
"xfield8": null,
"xfield9": null,
"xfield10": null,
"taskId": -1,
"orderNum": 0,
"phoneGeo": "",
"tags": null,
"assignTime": null,
"remarks": null,
"v1": "",
"dialStatus": 1,
"addStatus": 0,
"uin": null
}
}
或
{
"code": 400,
"msg": "聯系方式目標微信號不能為空",
"data": null
}
~~~
- 首頁
- 系統登錄注冊模塊
- 登錄模塊
- 注冊模塊
- 忘記密碼模塊
- 功能首頁渲染模塊
- 會話面板模塊
- 微信號登錄模塊
- 會話聯系人模塊
- 通訊錄模塊
- 聊天窗口模塊
- 快捷回復模塊
- 客戶錄入模塊
- 群管理模塊
- 歷史消息面板模塊
- 群發助手面板模塊
- 群發設置模塊
- 群發管理模塊
- 群發演示模塊
- 朋友圈面板模塊
- 發朋友圈模塊
- 朋友圈互動模塊
- 朋友圈歷史記錄模塊
- 客戶管理面板模塊
- 客戶查詢模塊
- 服務記錄模塊
- 批量標簽模塊
- 標簽管理模塊
- 昵稱管理模塊
- 個性稱呼模塊
- 批量導入客戶模塊
- 報表面板模塊
- 微信好友報表
- 被刪好友報表
- 新增好友報表
- 添加好友報表
- 服務記錄報表
- 轉賬記錄報表
- 紅包統計報表
- 會話統計報表
- 電話統計報表
- 標簽統計報表
- 賬號管理面板模塊
- 微信號管理模塊
- 部門管理模塊
- 子賬號管理模塊
- 在線日志模塊
- 機器人模塊
- 自動通過好友模塊
- 小程序商城模塊
- 微信號分配模塊
- 幫助中心面板模塊
- 個人中心模塊
- 我的賬號模塊
- 系統設置模塊
- 第三方能力接口對接
- 第三方登錄模塊
- 聯系人模塊
- 系統賬號模塊
- 服務版本接口迭代說明
- 素材庫
- 好友去重
- V群模塊