ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
#### 列表 ~~~[api] get:/dealer/promotion/coupon/index *number:storesId#门店ID string:search#搜索关键词 number:p=1#当前页数 number:ps=20#分页大小 <<< success { "code": 1, "msg": "", "time": "2018-08-16 15:23:34", "data": [ { "id": 1, "dealer_id": 2, "stores_id": 2, "name": "优惠券1", "money": "5.00", "number": 1, "conditions": { "type": 1, "value": "" }, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2016-01-01 00:00:00", "start_at": "2016-01-01 00:00:00", "end_at": "2016-01-01 00:00:00", "status_text": "正常" } ], "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 20 } } ~~~ #### 详情 ~~~[api] get:/dealer/promotion/coupon/retrieve/id/:id <<< success { "code": 1, "msg": "", "time": "2018-08-16 15:24:33", "data": { "id": 1, "dealer_id": 2, "stores_id": 2, "name": "优惠券1", "money": "5.00", "number": 1, "conditions": { "type": 1, "value": "" }, "status": 1, "created_at": "2016-01-01 00:00:00", "updated_at": "2016-01-01 00:00:00", "start_at": "2016-01-01 00:00:00", "end_at": "2016-01-01 00:00:00", "status_text": "正常" } } ~~~ #### 创建 ~~~[api] post:/dealer/promotion/coupon/create *number:stores_id#门店ID *string:name#名称 *number:money#金额 *number:number#数量 *object:conditions#条件 *number:type#类型,1=>无条件使用,2=>x商品使用,3=>订单商品总价满x元使用 *string:value#值 *string:start_at#开始时间 *string:end_at#结束时间 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2018-01-03 20:37:29", "data": [] } <<< example { "stores_id": 2, "name": "优惠券1", "money": 1, "number": 100, "conditions": { "type": 1, "value": "" }, "start_at": 1534404038, "end_at": 1534404038 } <<< example { "stores_id": 2, "name": "优惠券2", "money": 1, "number": 100, "conditions": { "type": 2, "value": 2 }, "start_at": 1534404038, "end_at": 1534404038 } <<< example { "stores_id": 2, "name": "优惠券3", "money": 1, "number": 100, "conditions": { "type": 1, "value": 20 }, "start_at": 1534404038, "end_at": 1534404038 } ~~~ #### 更新 ~~~[api] post:/dealer/promotion/coupon/update/id/:id string:name#名称 number:money#金额 number:number#数量 object:conditions#条件 string:start_at#开始时间 string:end_at#结束时间 number:status=1#状态,0=>禁用,1=>启用 <<< success { "code": 1, "msg": "success", "time": "2018-01-03 20:40:40", "data": [] } ~~~ #### 删除 ~~~[api] post:/dealer/promotion/coupon/delete/id/:id <<< success { "code": 1, "msg": "success", "time": "2018-01-03 20:41:03", "data": [] } ~~~