接口列表
菜单相关
菜单配置项查询接口
功能
查询所有的可配置菜单项目
地址
/api/user/menu
get方法查询
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| page | 否,默认1 | |||
| count | 否,默认20 |
返回格式
{"status": 0,"data": [{"id": 1, "name": "客户管理","content": "","note": ""},{"id": 2, "name": "拜访记录","content": "","note": ""}],"page_info": {"total": 5,"page": 1,"count": 20}}
post方法修改、添加、删除
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| menu_id | int | 修改:是 创建:不传 |
||
| name | string | 菜单项显示的名字 | 修改:是 删除:否 |
|
| content | string | 菜单项说明 | 否 | |
| note | string | 菜单项备注 | 否 | |
有menu_id是修改和删除,没有menu_id是创建
有menu_id的情况下,没有name是删除
返回格式
{"status": 0,"msg": "操作成功"}
员工菜单查询接口
功能
查询员工的菜单配置界面
地址
/api/user/usermenu
get方法查询
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| user_id | int | 员工id | 否,不传的时候返回全部员工 | |
| page | 否,默认1 | |||
| count | 否,默认20 |
返回格式
{"data": [{"phoneNumber": "15331761337","user_id": 2,"realName": "小耳尖","number": "10000","nickName": "小耳尖","headImageUrl": "http://data.eartip.cn/static/upload/avatar/avatar_1577689147112.png","sex": 1,"birthday": "2020-09-01 00:00:00","title": 1,"address": "云南耳尖","school": "xx","education": "本科","entryTime": "2020-09-01 00:00:00","officialTime": "2020-09-02 00:00:00","resignTime": "2020-09-02 00:00:00","lastLoginTime": "2020-08-07 17:39:22","status": 1,"menu": [{"id": 1, "name": "客户管理","content": "","note": ""},{"id": 2, "name": "拜访记录","content": "","note": ""},{...}]}],"status": 0,"page_info": {"total": 7,"page": 1,"count": 20}}
post方法修改
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| user_id | int | 员工id | 是 | |
| menu | array | [1,2,3],菜单项的id的数组 | 是 |
返回格式
{"status": 0,"msg": "修改成功"}
员工相关接口
员工登入接口
功能
登入
地址
/api/user/login
请求方法
POST
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| phoneNumber | string | 用户名 | 是 | |
| password | string | 密码 | 是 |
返回格式
{"data": {"phoneNumber": "15331761337","user_id": 2,"realName": "小耳尖","number": "10000","nickName": "小耳尖","headImageUrl": "http://data.eartip.cn/static/upload/avatar/avatar_1577689147112.png","sex": 1,"birthday": "2020-09-01 00:00:00","title": 1,"address": "云南耳尖","school": "xx","education": "本科","entryTime": "2020-09-01 00:00:00","officialTime": "2020-09-02 00:00:00","resignTime": "2020-09-02 00:00:00","lastLoginTime": "2020-08-07 17:39:22","status": 1,"session": "1e439274f898579732b9ea3bd9bed5f96939f17a3156bdf91b1d0867ba4b368c","sid": "1e439274f898579732b9ea3bd9bed5f96939f17a3156bdf91b1d0867ba4b368c"},"status": 0,"msg": "登陆成功"}
员工登出接口
功能
登出
地址
/api/user/logout
请求方法
POST
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| phoneNumber | string | 用户名 | 是 |
返回格式
{status: 0,msg: 登出成功}// 或者{status: 1,msg: 登出失败}
员工列表
功能
地址
/api/user/user
GET请求方法
查看用户
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| page | 否,默认1 | |||
| count | 否,默认20 | |||
| status | string | all:所有() 0:禁止 1:启用 |
否,默认all |
返回格式
{"data": [{"id": 6,"nickName": "李俊辉","realName": "李俊辉","headImageUrl": "http://data.eartip.cn/static/upload/avatar/avatar_1577705537821.jpg","phoneNumber": "18288268391","sex": 1,"birthday": "2020-09-02 00:00:00","title": 1,"address": "云南嵩明","school": "云南师范大学","education": "本科","rankId": 3,"rankType": 1,"entryTime": "2019-11-19 00:00:00","officialTime": "2020-02-19 00:00:00","resignTime": null,"lastLoginTime": "2021-05-07 16:36:34","isLogin": 1,"status": 1},{...}],"status": 0,"page_info": {"total": 37,"page": 1,"count": 20}}
客户相关接口
客户查询
功能
客户的新增、修改、查询
地址
/api/customers/customers
GET方法查询客户列表
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| name | string | 根据客户人的昵称、姓名、单位查询 | ||
| organization_id | int | 根据单位id查询 | 否 | |
| phoneNumber | string | 根据客户人的手机号查询 | 否 | |
| page | int | 默认1 | ||
| count | int | 默认20 |
参数说明:
有多个客户的时候,根据客户的修改时间从新到旧排序
返回格式
{"data": [{"id": 249,"type": 2,"nickName": "çè³","realName": "","avatar": "https://thirdwx.qlogo.cn/mmopen/vi_32/m8avHAEOianWQkC4hiaCdpqndHszBBI2tPb1ibRVeUKTcOoIZibEIw0xeGHSUt1y9n0T6CKicsHbZRkg4D63uicSHyvw/132","phoneNumber": "13987022559","job": "","sex": 2,"createTime": "2021-01-01 21:49:56","updateTime": "2021-01-01 21:49:56","status": 1},{"id": 248,"type": 2,"nickName": "å§é«å®","realName": "","avatar": "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eqauia5D89LQ23za921MjGUkQ0OVC5n8jCYsITKjQAY78aRAmM1G78BKcDvDQxhlsic90vWFZq07GibA/132","phoneNumber": "18088175340","job": "","sex": 0,"createTime": "2021-01-01 20:12:28","updateTime": "2021-01-01 20:12:28","status": 1}],"status": 0,"page_info": {"total": 239,"page": 1,"count": 2}}
客户单位查询
功能
查询单位、修改、新建单位
地址
/api/customers/organization
GET方法查询单位
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| name | int | 名字,根据传入参数模糊查询 | 否,不传的时候查询全部 | |
| status | string | 0:删除的单位 1:正常的单位 2:正常的单位+删除的单位 |
默认2 | |
| page | int | 默认1 | ||
| count | int | 默认20 |
返回格式
{"data": [{"id": 86,"type": 1,"groupName": "GPS","groupDetail": "GPS","status": 1,"createTime": "2020-11-05 11:41:37","updateTime": "2020-11-05 11:41:37"},{"id": 85,"type": 1,"groupName": "大理市宣传","groupDetail": "大理市宣传部","status": 1,"createTime": "2020-11-02 17:04:12","updateTime": "2020-11-07 10:25:23"},{"id": 84,"type": 1,"groupName": "耳尖团队","groupDetail": "耳尖团队","status": 1,"createTime": "2020-08-07 09:34:17","updateTime": "2020-08-07 09:34:17"}],"status": 0,"page_info": {"total": 86,"page": 1,"count": 3}}
跟进、需求变跟记录接口
跟进、需求变更上报接口
功能
跟进记录、需求便跟记录的上报
地址
/api/record/upload
请求方法
POST
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| customers_id | int | 客户id | 是 | |
| organization_id | int | 客户单位id | 是 | |
| follower_id | array | 跟进者id的数组 | 哪些员工跟进了客户、记录的需求的变更,例如:[1,2,3] :id为1、2、3的员工 | 是 |
| record_time | string | 拜访时间、需求变更的时间 | 是 | |
| content | string | 需求内容 | 有需求变更的时候传 | 需要上传需求内容的时候必须传 |
| content_attach | string | 附件url地址, 比如聊天截图等 |
否 | |
| content_note | string | 需求备注 | 否 | |
| event | 跟进的事件 1:接入 2:走访拜访 3:电话拜访 4:签约 5:售后 |
有拜访跟进记录的时候传 | 需要上传需求内容的时候必须传 |
|
| gain | string | 这次跟进的收获 | 否 | |
| event_attach | string | 附件url地址, 比如聊天截图等 |
否 | |
| event_note | string | 跟进备注 | 否 |
需求内容 content 和 跟进记录的event 必须至少传一个
返回格式
{status: 0,msg: '创建成功'}{status: 1,msg: '失败描述'}
示例
请求参数{"customers_id": 3,"follower_id": [1, 2],"record_time": "2021-01-01 12:00:00","event": 1,"content": "日报","content_note": "客户沟通很好"}返回结果{"data": {},"status": 0,"msg": "创建成功"}
跟进记录查询接口
功能
跟进记录的查询
地址
/api/record/follow
GET方法查询
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| follow_id | int | 跟进记录id | 否,有传的时候查找这个id的,没有的时候查询其他条件 | |
| customers_id | int | 客户id | 否,没有传的时候返回所有客户的跟进记录 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"data": [{"id": 7,"customers_id": 227,"event": 2,"follower": [{"nickName": "黄浩原","realName": "黄浩原","phoneNumber": "13577133928"}],"attach": null,"recordTime": "2021-07-23 09:13:55","operator_id": 22,"gain": null,"createTime": "2021-07-23 09:18:40","note": null,"operator": {"nickName": "张建林","realName": "张建林","phoneNumber": "15925130924"},"customers": {"nickName": "Miss'Z","realName": "赵丽萍","organization": "云南耳尖"},"customers_group": null},{...}],"status": 0,"page_info": {"total": 1,"page": 1,"count": 20}}{status: 1,msg: '失败描述'}
POST方法修改
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| follow_id | int | 跟进记录id | 是 | |
| customers_id | int | 客户id | 是 | |
| organization_id | int | 客户单位id | 是 | |
| follower_id | array | 跟进者id的数组 | 哪些员工跟进了客户、记录的需求的变更,例如:[1,2,3] :id为1、2、3的员工 | 是 |
| record_time | string | 拜访时间、需求变更的时间 | 是 | |
| event | string | 跟进的事件 1:接入 2:走访拜访 3:电话拜访 4:签约 5:售后 |
是 |
|
| gain | string | 这次跟进的收获 | 否 | |
| event_attach | string | 附件url地址, 比如聊天截图等 |
否 | |
| event_note | string | 需求备注 | 否 |
返回格式
{status: 0,msg: '修改成功'}{status: 1,msg: '失败描述'}
跟进记录删除接口
功能
跟进记录的删除
地址
/api/record/delfollow
请求方法
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| follow_id | int | 跟进记录的id | 是 |
返回格式
{status: 0,msg: '删除成功'}
需求变更记录查询接口
功能
需求变更记录的查询
地址
/api/record/demand
GET方法查询
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| demand_id | int | 跟进记录的id | 否,有传的时候查找这个id的,没有的时候查询其他条件 | |
| customers_id | int | 客户id | 否,没有传的时候返回最新一个客户的需求记录 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"data": [{"id": 7,"customers_id": 236,"content": "需求优化","attach": "http://data.eartip.cn/static/upload/cover/cover_1627024247758.png","recordTime": "2021-07-23 15:10:36","operator_id": 22,"createTime": "2021-07-23 15:10:53","note": "测试序曲","operator": {"nickName": "张建林","realName": "张建林","phoneNumber": "15925130924"},"customers": {"nickName": ".","realName": "普翠","organization": ""},"customers_group": null},{...}],"status": 0,"page_info": {"total": 1,"page": 1,"count": 20}}{status: 1,msg: '失败描述'}
POST方法修改
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| demand_id | int | 需求变更记录id | 是 | |
| customers_id | int | 客户id | 是 | |
| organization_id | int | 客户单位id | 是 | |
| follower_id | array | 跟进者id的数组 | 哪些员工跟进了客户、记录的需求的变更,例如:[1,2,3] :id为1、2、3的员工 | 是 |
| content | string | 需求变跟内容 | 是 | |
| demand_attach | string | 附件url地址, 比如聊天截图等 |
否 | |
| demand_note | string | 需求备注 | 否 |
返回格式
{status: 0,msg: '修改成功'}
需求变更记录删除接口
功能
需求变跟记录的删除
地址
/api/record/deldemand
请求方法
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| demand_id | int | 需求变跟进记录的id | 是 |
返回格式
{status: 0,msg: '删除成功'}
满意度查询、录入、修改接口
功能
地址
/api/feedback/satisfy
GET方法查询满意度
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| customers_id | int | 客户id | 是 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"data": [{"id": 1,"value": 4,"attach": null,"recordTime": "2021-07-21 01:02:30","note": null,"operator_id": 2,"customers_id": 1,"operator": {"nickName": "小耳尖","realName": "小耳尖","phoneNumber": "15331761337"},"customers": {"nickName": "昵称","realName": "","organization": ""}}],"status": 0,"page_info": {"total": 1,"page": 1,"count": 20}}
POST方法录入、修改满意度
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| satisfy_id | int | 修改:是 创建:不传 |
||
| customers_id | int | 客户id | 是 | |
| record_time | string | 客户反馈的时间 | 是 | |
| follower_id | array | 被点赞、批评的员工的id的数组 | 例如: 三个人:[1,2,3] 一个人:[1] |
否 |
| attach | string | 附件url地址, 比如聊天截图等 |
否 | |
| value | int | 满意度的值(-10~10) | ||
| note | string | 备注 | 否 |
返回格式
{status: 0,msg: '录入成功'}{status: 1,msg: '失败描述'}
示例
录入的请求参数:{"customers_id": 1,"record_time": "2021-07-15 01:02:30","follower_id": [1,2],"value": 4}
满意度删除接口
功能
满意度记录的删除
地址
/api/feedback/delsatisfy
请求方法
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| satisfy_id | int | 满意度记录的id | 是 |
返回格式
{status: 0,msg: '删除成功'}
合同记录查询、修改、新建接口
功能
地址
/api/contract/contract
GET方法查询合同记录
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| organization_ids | array | 客户的单位id,可以传多个 [1,2,3] |
否,不传的时候所有客户合同记录 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一年前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"data": [{"id": 1,"organization_id": 1,"name": "天下第r合同","code": "code","amount": "1200000.00","sign_time": "2021-08-01 00:00:00","follower": [{"nickName": "admin","realName": "admin","phoneNumber": "18888888888"},{"nickName": "小耳尖","realName": "小耳尖","phoneNumber": "15331761337"}],"status": 0,"aging_start_time": null,"aging_end_time": null,"remit_amount": "1000.00","remit_time": "2021-08-01 00:00:00","createTime": "2021-07-21 11:27:05","updateTime": "2021-07-21 11:27:05","note": null,"editor": {"nickName": "admin","realName": "admin","phoneNumber": "18888888888"},"creator": {"nickName": "admin","realName": "admin","phoneNumber": "18888888888"}}],"status": 0}
POST方法新建、修改合同
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| contract_id | 修改:是 新建:不传 |
|||
| organization_id | int | 单位id | 是 | |
| name | string | 合同名字 | 是 | |
| code | string | 合同编号 | 否 | |
| amount | float | 合同金额 | 否 | |
| sign_time | string | 签约日期 | 比如:2022-01-01 12:00:00 | 否 |
| remit_amount | float | 打款金额 | 否 | |
| remit_time | string | 打款时间 | 格式:2022-01-01 12:00:00 | 否 |
| creator_id | int | 创建人(用户)的id | 12 | 否 |
| follower_id | array | 跟进人id的数组 | [1,2,3] | 否 |
| editor_id | int | 编辑人(用户)的id | 34 | 否 |
| note | string | 备注 | 否 |
说明:有contract_id的时候是修改,没有的时候是创建
返回格式
{status: 0,msg: '操作成功'}{status: 1,msg: '失败描述'}
示例
post 参数:{"organization_id": 1,"name": "天下第一合同","code": "code","amount": 12,"sign_time": "2021-08-01 00:00:00","remit_amount": 1000,"remit_time": "2021-08-01 00:00:00","creator_id": 1,"follower_id": [1,2],"editor_id": 1}
合同删除接口
功能
合同的删除
地址
/api/contract/delcontract
请求方法
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| contract_id | int | 合同的id | 是 |
返回格式
{status: 0,msg: '删除成功'}
统计相关的接口
签约金额、次数统计
功能
按照客户单位,查询一段时间内的签约金额、次数
地址
/api/stats/sign
请求方法
GET
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| organization_ids | array | 客户单位id,可以传多个 [1,2,3] |
否,不传的时候返回所有 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"status": 0,"data": [{"organization_id": 83,"sign_amount": "100000.00","sign_count": 1,"min_sign_time": "2021-07-26 09:31:33"},{"organization_id": 84,"sign_amount": "100000.00","sign_count": 1,"min_sign_time": "2021-07-26 09:28:31"},{"organization_id": 1,"sign_amount": "1200000.00","sign_count": 1,"min_sign_time": "2021-07-21 00:00:00"}],"page_info": {"total": 3,"page": 1,"count": 20}}{status: 1,msg: '失败描述'}
需求变跟次数统计接口
功能
按照客户单位,查询一段时间内的需求变更次数
地址
/api/stats/demand
请求方法
GET
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| organization_ids | array | 客户单位id,可以传多个 [1,2,3] |
是 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 | |
| page | int | 第几页 | 否,默认1 | |
| count | int | 每页的个数 | 否,默认20 |
返回格式
{"status": 0,"data": [[{"organization_id": 1,"demand_count": 30,"m_recordTime": "2021-07-16 14:00:00"},{"organization_id": 2,"demand_count": 10,"m_recordTime": "2021-07-16 14:00:00"},{"organization_id": 4,"demand_count": 5,"m_recordTime": "2021-07-16 14:00:00"},{"organization_id": null,"demand_count": 2,"m_recordTime": "2021-07-23 09:13:55"}],{"total": 4,"page": 1,"count": 20}]}{status: 1,msg: '失败描述'}
跟进次数统计接口
功能
按照客户单位,查询一段时间内的跟进次数
地址
/api/stats/follow
请求方法
GET
参数说明
| 名称 | 类型 | 说明 | 备注 | 是否必须 |
|---|---|---|---|---|
| organization_id | int | 客户单位id | 是 | |
| start_time | string | 开始时间:2020-01-01 00:00:00 | 否,默认一周前 | |
| end_time | string | 结束时间:2021-01-01 00:00:00 | 否,默认现在 |
返回格式
{"status": 0,"data": [[{"organization_id": 1,"follow_count": 2,"min_sign_time": "2021-07-23 15:00:00"}],{"total": 1,"page": 1,"count": 20}]}{status: 1,msg: '失败描述'}
