Authored by mingdan.ge

礼品卡

## 1、获取礼品卡列表
获取礼品卡列表 (**method=app.giftcard.list**)
**请求参数**
| 参数名称 | 参数类型 |可否为空 |示例 | 备注 |
| ---------|:--------:| --------:|-----:|-----:|------:|
|uid|int | 否 |500027362 |礼品卡号 |
|status|int | 是 | |1-可使用,2-已冻结,3-已过期,4-已用完 |
**注意**,通用的头部没有列出。
**请求示例:**
http://localhost:8090/gateway?method=app.giftcard.list&debug=XYZ&uid=500027362
code为200即为成功,否则是失败。 响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data":[
{
"desc": "已冻结",
"giftCardInfoBOList": [
{
"activateTime": 1504152032,
"activateUid": 500027362,
"amount": 600,
"cardCode": "LPK00500000012",
"endTime": 1506942032,
"id": 30,
"name": "卡片12",
"remainAmount": 100,
"status": 50
}
],
"type": "2"
},
{
"desc": "已用完",
"giftCardInfoBOList": [
{
"activateTime": 1504152032,
"activateUid": 500027362,
"amount": 600,
"cardCode": "LPK00500000026",
"endTime": 1506942032,
"id": 46,
"name": "卡片26",
"remainAmount": 100,
"status": 70
}
],
"type": "4"
},
{
"desc": "可使用",
"giftCardInfoBOList": [
{
"activateTime": 1504152032,
"activateUid": 500027362,
"amount": 600,
"cardCode": "LPK00500000011",
"endTime": 1506942032,
"id": 28,
"name": "卡片11",
"remainAmount": 100,
"status": 40
},
{
"activateTime": 1504142032,
"activateUid": 500027362,
"amount": 600,
"cardCode": "LPK00500000009",
"endTime": 1506942032,
"id": 24,
"name": "卡片9",
"remainAmount": 100,
"status": 40
}
],
"type": "1"
},
{
"desc": "已过期",
"giftCardInfoBOList": [
{
"activateTime": 1500152032,
"activateUid": 500027362,
"amount": 600,
"cardCode": "LPK00500000027",
"endTime": 1506942032,
"id": 48,
"name": "卡片27",
"remainAmount": 100,
"status": 60
}
],
"type": "3"
}
] ,
"md5": "3821b8603e9e240a7d619c69ebfba96a",
"message": "操作成功"
}
```
\ No newline at end of file
... ...
## 1、获取礼品卡分页列表
获取礼品卡列表 (**method=app.giftcard.pagelist**)
**请求参数**
| 参数名称 | 参数类型 |可否为空 |示例 |默认值 | 备注 |
| ---------|:--------:| --------:|-----:|------:|-----:|------:|
|uid|int | 否 |123456 | | |
|status|int|否 | 1 | |1-可使用,2-已冻结,3-已过期,4-已用完|
|page|int |是 |1 | 1 | |
|limit|int |是 |10 | 10| |
**注意**,通用的头部没有列出。
**请求示例:**
http://localhost:8080/gateway?method=app.giftcard.pagelist&debug=XYZ&uid=123456&status=1&page=1&limit=20
code为200即为成功,否则是失败。 响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"currPage": 3,
"currTotal": 9,
"giftCardInfoBOList": [
{
"activateTime": 1504152032,
"activateUid": 500027364,
"amount": 600,
"cardCode": "LPK00500000022",
"dateStr": "2017.08.31-2017.10.02",
"endTime": 1506942032,
"id": 58,
"name": "卡片22",
"remainAmount": 100,
"status": 40
},
{
"activateTime": 1504152032,
"activateUid": 500027364,
"amount": 600,
"cardCode": "LPK00500000023",
"dateStr": "2017.08.31-2017.10.02",
"endTime": 1506942032,
"id": 60,
"name": "卡片23",
"remainAmount": 100,
"status": 40
},
{
"activateTime": 1504151032,
"activateUid": 500027364,
"amount": 500,
"cardCode": "LPK00500000005",
"dateStr": "2017.08.31-2017.10.01",
"endTime": 1506842032,
"id": 16,
"name": "卡片5",
"remainAmount": 100,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504151032,
"activateUid": 500027364,
"amount": 500,
"cardCode": "LPK00500000025",
"dateStr": "2017.08.31-2017.10.01",
"endTime": 1506842032,
"id": 44,
"name": "卡片25",
"remainAmount": 100,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504150032,
"activateUid": 500027364,
"amount": 100,
"cardCode": "LPK00500000001",
"dateStr": "2017.08.31-2017.09.30",
"endTime": 1506742032,
"id": 8,
"name": "棉花用的谁抢杀谁",
"remainAmount": 50,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504150032,
"activateUid": 500027364,
"amount": 200,
"cardCode": "LPK00500000002",
"dateStr": "2017.08.31-2017.09.30",
"endTime": 1506742032,
"id": 10,
"name": "棉花用的谁抢灭谁",
"remainAmount": 200,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504150032,
"activateUid": 500027364,
"amount": 200,
"cardCode": "LPK00500000003",
"dateStr": "2017.08.31-2017.09.30",
"endTime": 1506742032,
"id": 12,
"name": "33333",
"remainAmount": 100,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504150032,
"activateUid": 500027364,
"amount": 400,
"cardCode": "LPK00500000004",
"dateStr": "2017.08.31-2017.09.30",
"endTime": 1506742032,
"id": 14,
"name": "卡片4",
"remainAmount": 100,
"status": 40,
"willExpire": "即将过期"
},
{
"activateTime": 1504150032,
"activateUid": 500027364,
"amount": 400,
"cardCode": "LPK00500000024",
"dateStr": "2017.08.31-2017.09.30",
"endTime": 1506742032,
"id": 42,
"name": "卡片24",
"remainAmount": 100,
"status": 40,
"willExpire": "即将过期"
}
],
"limit": 9,
"pageSize": 0,
"total": 27
},
"md5": "3ad431ca76d80aa8e8bf3ed4c9835e3c",
"message": "操作成功"
}
```
\ No newline at end of file
... ...