优惠券管理
<p><strong>简要描述:</strong> </p>
<ul>
<li>优惠券管理</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/m/favourable</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">pageno</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>页码</td>
</tr>
<tr>
<td style="text-align: left;">pagesize</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>每页数量</td>
</tr>
<tr>
<td style="text-align: left;">fl_id</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">int</td>
<td>分类id</td>
</tr>
<tr>
<td style="text-align: left;">pr_id</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">int</td>
<td>商品id</td>
</tr>
<tr>
<td style="text-align: left;">value</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td>搜索的优惠券</td>
</tr>
<tr>
<td style="text-align: left;">favourable_type</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>优惠券类型(-1全部,0商户优惠券;1分类优惠券;2商品优惠券)</td>
</tr>
<tr>
<td style="text-align: left;">used_state</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>状态(-1全部;0未使用;1已使用;2已锁定;3仍可使用;4已达上限)</td>
</tr>
<tr>
<td style="text-align: left;">price_type</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>面值类型(-1全部;2面值优惠;1折扣优惠)</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>{
"__type": "result",
"state": "ok",
"msg": "获取成功",
"data": {
"__page_data": {
"__cur_pageno": "1",
"__cur_pagesize": 20,
"__cur_pagesum": 7,
"__cur_sumcount": "129"
},
"cate_info": [
[
"403",
"模拟人生游戏"
],
[
"436",
"快发卡测试"
],
[
"8855",
"棒棒糖补领号3"
],
[
"15377",
"新易电竞"
],
[
"29845",
"3"
],
[
"29846",
"4"
],
[
"29847",
"5"
],
[
"29850",
"9"
],
[
"32361",
"nnnbb"
],
[
"38814",
"飞车账号22"
],
[
"39023",
"676767"
],
[
"39266",
"售卖扣扣"
],
[
"39449",
"测试的分类名称"
],
[
"39550",
"徽杭古道"
],
[
"39775",
"夏季女装"
],
[
"39776",
"冬季女装"
],
[
"39777",
"秋季女装"
],
[
"40088",
"水电费水电费"
],
[
"40106",
"哈哈哈"
]
],
"favourable_info": [
{
"id": "31267",
"value": "s6AX0U",
"type": "0",
"state": "已达上限",
"used_time": "优惠券还未使用",
"created": "2018-12-18 20:19:56",
"is_lock": "0",
"worth": "0.30",
"volume_count": "1",
"volume_used_count": "1",
"volume_state": "1",
"limit_money": "0",
"limit_time": 0
},
{
"id": "31068",
"value": "mk1UcS",
"type": "0",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-11 18:27:23",
"is_lock": "0",
"worth": "23.00",
"volume_count": "1",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "32",
"limit_time": 0
},
{
"id": "30938",
"value": "l58vF3SrAnkDWKXVTYRi",
"type": "2",
"state": "禁止使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "0",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30937",
"value": "ZejHT2MBDm7Aa8n6Qyof",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30936",
"value": "Wq3Tm8bNVxhfOHdeUjQt",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30935",
"value": "8bc5d73ECFZ0tvmplLzw",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30934",
"value": "gVWStNUlqJHdQIzDprGZ",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30933",
"value": "6rRHIC9dsSphnm8bNzwQ",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30932",
"value": "gpX3JszD59KockIHPibm",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30931",
"value": "9b0wthipJRujAqxDl1ac",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30930",
"value": "xpkCZQ8DdKWn2SPlmYq5",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30929",
"value": "jKb6xPFH32AZRCSwyqfe",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30928",
"value": "yvWQEx9Caw2iDX8ZkKHg",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30927",
"value": "HfGlLIM7DaZt39Od1zvQ",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30926",
"value": "zocGTRhuSQwBZUpnNH3k",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30925",
"value": "HP5uSgxBTaiL2cYwJnX9",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30924",
"value": "d0RpUAkrzHLVIJsuBg8x",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-12-07 10:38:46",
"is_lock": "0",
"worth": "3.00",
"volume_count": "20",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "200",
"limit_time": 0
},
{
"id": "30833",
"value": "1111111",
"type": "0",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-11-23 16:40:42",
"is_lock": "0",
"worth": "1.00",
"volume_count": "1",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "0",
"limit_time": 0
},
{
"id": "30196",
"value": "2qxWwHX3pI",
"type": "2",
"state": "禁止使用",
"used_time": "优惠券还未使用",
"created": "2018-11-01 11:07:11",
"is_lock": "0",
"worth": "1.00",
"volume_count": "1",
"volume_used_count": "0",
"volume_state": "0",
"limit_money": "0",
"limit_time": 0
},
{
"id": "30195",
"value": "Ik7bn63NGJ",
"type": "2",
"state": "正常使用",
"used_time": "优惠券还未使用",
"created": "2018-11-01 11:07:11",
"is_lock": "0",
"worth": "1.00",
"volume_count": "1",
"volume_used_count": "0",
"volume_state": "1",
"limit_money": "0",
"limit_time": 0
}
]
},
"time": 1545444955
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<pre><code> "id" => $value['id'],
"value" => $value['volume_value'],//优惠券的值
"type" => $value['volume_type'],//1分类 2商品 0店铺
"state" => $state,//禁止使用 已达上限 正常使用 已过期
"used_time" => $value['is_used'] == "0" ? "优惠券还未使用" : date('Y-m-d H:i:s', $value['used_time']),//最后使用时间
"created" => date('Y-m-d H:i:s', $value['created_at']),//创建时间
"is_lock" => $value['is_lock'],//0未锁定 1已锁定
"worth" => $value['worth'], //价值多少1折 10元
"worth_type" => $value['worth_type'], //1是折扣卷 2是面值卷
"volume_count" => $value['volume_count'],//可使用次数
"volume_used_count" => $value['volume_used_count'],//已使用次数
"volume_state" => $value['volume_state'],//0已禁用 1正常
"limit_money" => $limit_money,//限制使用的金额
"limit_time" => $limit_time//有效期</code></pre>