- 2.4.1.7.11. Customer(客户)
- 2.4.1.7.11.1. 查询列表(Customer关注客户)
- 2.4.1.7.11.2. 指定记录
- 2.4.1.7.11.3. EXP列表
- 2.4.1.7.11.4. 添加Customer
- 2.4.1.7.11.5. 编辑Customer
- 2.4.1.7.11.6. 删除Customer
2.4.1.7.11. Customer(客户)
2.4.1.7.11.1. 查询列表(Customer关注客户)
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/get_list |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| page_index | 查询页码 | Integer | 大于 0,如果为空,则默认从第一页显示 | 否 |
| page_size | 每页记录数 | Integer | 大于 0,如果为空,则默认为 20 | 否 |
| condition | 查询条件 | Json | LIKE模糊搜索条件 | 否 |
| start_time | 开始时间 | Datetime | 按创建时间搜索的开始时间和结束时间 | 否 |
| end_time | 结束时间 | Datetime | 否 |
condition参数:
格式
[["${key}", "${operator}", "${value}"]] 即 [["查询值", "运算符", "查询内容"]]
其中,运算符为MySQL比较运算符,支持一下几种:
| 运算符 | 含义 |
|---|---|
| = | 等于 |
| > | 大于 |
| \< | 小于 |
| >= | 大于等于 |
| \<= | 小于等于 |
| !=或\<> | 不等于 |
| LIKE或like | 包含 |
举例
[["customer_id", "=", "1001"], ["customer_name", "LIKE", "智物联"]]
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 结果 | Json | 是 |
返回数据举例:
{"code": 200,"msg": "success","mix_code":130001,"mix_msg":"","mix_ext":"","result": {"page_index": 1,"page_size": 20,"total_pages": 1,"total_records": 1,"data": [{"customer_id": 1001,"customer_name": "智物联","description": "智物联-物联网平台","secret": "5JHC","exp_id": "zhiwulian.exp","province": "广东省","city": "深圳市","address": "美声创谷春谷","phone": "075523740592","contact": "admin","mobile": "13800138000","email": "admin.mixlinker.com","template": null"script": null,"reference": null,"created": "2018-09-18 17:42:50"}]}}
2.4.1.7.11.2. 指定记录
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/get |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| customer_id | 客户标识 | String | 是 |
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 返回结果 | Json | 是 |
返回示例:
{"code": 200,"msg": "查询成功","mix_code":130001,"mix_msg":"","mix_ext":"","result": {"customer_id": 1001,"customer_name": "智物联","description": "智物联-物联网平台","secret": "5JHC","exp_id": "zhiwulian.exp","province": "广东省","city": "深圳市","address": "美声创谷春谷","phone": "075523740592","contact": "admin","mobile": "13800138000","email": "admin.mixlinker.com","template": "","script": "","reference": "","created": "2018-09-18 17:42:50"}}
2.4.1.7.11.3. EXP列表
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/get_exp_list |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 返回结果 | Json | 是 |
返回示例:
{"code": 200,"msg": "查询成功","mix_code":130001,"mix_msg":"","mix_ext":"","result": [{"exp_id": "develop.exp","exp_name": "智物联"}]}
2.4.1.7.11.4. 添加Customer
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/add |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| customer_name | 客户名称 | String | 是 | |
| description | 描述 | Text | 否 | |
| secret | 管理密码 | String | 否 | |
| exp_id | EXP标识 | String | 否 | |
| province | 省份 | String | 否 | |
| city | 城市/地区 | String | 否 | |
| address | 地址 | String | 否 | |
| phone | 电话 | String | 否 | |
| contact | 联系人 | String | 否 | |
| mobile | 联系人手机 | String | 否 | |
| 邮箱 | String | 否 | ||
| template | 模板/样式 | Text | 否 | |
| script | 脚本 | Text | 否 | |
| reference | 参考号 | String | 否 |
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 返回结果 | Json | 是 |
返回示例:
{"code": 200,"msg": "添加成功","mix_code":130001,"mix_msg":"","mix_ext":"","result": []}
2.4.1.7.11.5. 编辑Customer
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/edit |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| customer_id | 客户标识 | String | 是 | |
| customer_name | 客户名称 | String | 否 | |
| description | 描述 | Text | 否 | |
| secret | 管理密码 | String | 否 | |
| exp_id | EXP标识 | String | 否 | |
| province | 省份 | String | 否 | |
| city | 城市/地区 | String | 否 | |
| address | 地址 | String | 否 | |
| phone | 电话 | String | 否 | |
| contact | 联系人 | String | 否 | |
| mobile | 联系人手机 | String | 否 | |
| 邮箱 | String | 否 | ||
| template | 模板/样式 | Text | 否 | |
| script | 脚本 | Text | 否 | |
| reference | 参考号 | String | 否 |
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 返回结果 | Json | 是 |
返回示例:
{"code": 200,"msg": "编辑成功","mix_code":130001,"mix_msg":"","mix_ext":"","result": []}
2.4.1.7.11.6. 删除Customer
调用接口:
| 属性 | 值 |
|---|---|
| url | /api/customer/delete |
| http方法 | post |
| Content-Type | application/json或application/x-www-form-urlencoded |
请求参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| customer_id | 客户标识 | String | 是 |
返回参数:
| 字段 | 字段名称 | 字段类型 | 说明 | 是否必传 |
|---|---|---|---|---|
| code | 返回码 | Integer | 200:成功 500:失败 | 是 |
| msg | 提示信息 | String | 是 | |
| result | 返回结果 | Json | 是 |
返回示例:
{"code": 200,"msg": "删除成功","mix_code":130001,"mix_msg":"","mix_ext":"","result": []}
