Authored by wei

开关控制管理

# 开关控制管理
## 首页列表
> 'gate/getGateList'
### 入参
-----------------------------------------------------------
|参数名 |必填 |类型 |示例值 |描述 |
|------ |---- |---- |------ |---- |
|status |否 |string |0 |0:关闭;1:开启 |
### 返回
``` json
{
"code": 200,
"data": {
"list": [
{
"createTime": 1446197882,
"id": 5,
"metaKey": "freeShippingLimit",
"platform": "iphone,ipad,android,androidpad,h5,web,platform",
"price": 599,
"status": 1,
"title": "包邮设置",
"updateTime": 1460549166,
"url": "http://m.yohobuy.com/"
},
{
"createTime": 1445478483,
"id": 3,
"metaKey": "cartUseRedEnvelope",
"platform": "iphone,android,h5,web",
"price": 0,
"status": 0,
"title": "购物车使用红包结算开关",
"updateTime": 1460618669,
"url": "http://www.yohobuy.com"
},
{
"createTime": 1444365268,
"id": 2,
"metaKey": "userBindMobile",
"platform": "iphone,android",
"price": 0,
"status": 1,
"title": "第三方登录绑定",
"updateTime": 1453877046,
"url": "http://www.yohobuy.com"
},
{
"createTime": 1442465431,
"id": 1,
"metaKey": "sf",
"platform": "ipad",
"status": 1,
"title": "ts",
"updateTime": 1446190551,
"url": "sf"
}
],
"page": 1,
"size": 10,
"total": 4,
"totalPage": 1
},
"md5": "ad238165558c64266598e6e103c832ae",
"message": "操作成功"
}
```
## 根据 ID 加载实体
> 'gate/addGate'
### 入参
-----------------------------------------------------------
|参数名 |必填 |类型 |示例值 |描述 |
|------ |---- |---- |------ |---- |
|metaKey |是 |string | freeShippingLimit |控制平台元值|
|title |是 |string | 包邮设置 |控制器名称|
|url |是 |string | http://yoho.cn |控制器链接地址|
|price |否 |string | 100 |价格|
|platform |是 |string | web |iphone,ipad,android,androidpad,h5,web,platform|
|status |否|byte|1|1:开启、0:关闭|
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "新增成功"
}
```
## 更新开关控制
> 'gate/updateGate'
### 入参
-----------------------------------------------------------
|参数名 |必填 |类型 |示例值 |描述 |
|------ |---- |---- |------ |---- |
|id |是 |int | 1 |分类名称|
|metaKey |是 |string | freeShippingLimit |控制平台元值|
|title |是 |string | 包邮设置 |控制器名称|
|url |是 |string | http://yoho.cn |控制器链接地址|
|price |否 |string | 100 |价格|
|platform |是 |string | web |iphone,ipad,android,androidpad,h5,web,platform|
|status |否|byte|1|1:开启、0:关闭|
### 返回
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "更新成功"
}
## 删除
> 'gate/deleteGate'
### 入参
-----------------------------------------------------------
|参数名 |描述|类型 |示例值 |必填 |
|------ |---- |---- |------ |---- |
|id |id |Integer | 5 |是|
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "删除成功"
}
```
## 根据id获得对应信息
> 'gate/getGateById'
### 入参
-----------------------------------------------------------
|参数名 |描述|类型 |示例值 |必填 |
|------ |---- |---- |------ |---- |
|id |id |Integer | 5 |是|
### 返回
``` json
{
"code": 200,
"data": {
"createTime": 1446197882,
"id": 5,
"metaKey": "freeShippingLimit",
"platform": "iphone,ipad,android,androidpad,h5,web,platform",
"price": 599,
"status": 1,
"title": "包邮设置",
"updateTime": 1460549166,
"url": "http://m.yohobuy.com/"
},
"md5": "2030c690ec5eb6b9db1e7b4aed0ca30a",
"message": "操作成功"
}
```
... ...