微信免单抽奖5.4.md
7.66 KB
1、参与抽奖的订单列表
参与抽奖的订单列表(/activity/lottery/getValidOrderList)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
uid | int | 否 | 20364598 | null | 用户ID |
limit | int | 是 | 1 | 每页展示条数 | |
page | int | 是 | 1 | 第几页 |
接口说明
注意,通用的头部没有列出。
请求示例
http://192.168.102.14:8090/activity/lottery/getValidOrderList?uid=20364598&limit=10&page=1&debug=XYZ
响应
code为200即为成功,否则是失败。
响应参数,data部分
响应成功JSON格式如下所示:
{
"code": 200,
"message": "success",
"md5": "",
"data": [
{
"id": 5553844,
"order_code": "160825664",
"order_type": 4,
"refund_status": 0,
"uid": 20364598,
"parent_order_code": "0",
"payment": 21,
"amount": 21,
"payment_status": "Y",
"user_confirm_paid": "N",
"use_limit_code": "N",
"payment_type": 2,
"counter_flag": "Y",
"status": 0,
"ordersGoodsList": [
{
"product_id": 275267,
"product_skn": 51153093,
"product_name": "Life·After Life 侧拉链长款长袖T恤",
"cn_alphabet": "LALA504LT06",
"good_id": 355689,
"goods_price": 11,
"goods_amount": 11,
"factory_color_name": "绿色",
"goods_image": null,
"goods_type": 1,
"expect_arrival_time": "",
"buy_num": 1,
"size_name": "L",
"color_name": "绿色"
}
]
},
{
"id": 5553598,
"order_code": "160950486",
"order_type": 4,
"refund_status": 0,
"uid": 20364598,
"parent_order_code": "0",
"payment": 0,
"amount": 43,
"payment_status": "N",
"user_confirm_paid": "N",
"use_limit_code": "N",
"payment_type": 2,
"counter_flag": "Y",
"status": 0,
"ordersGoodsList": [
{
"product_id": 193441,
"product_skn": 51111683,
"product_name": "Ha/J For Junior 女潮童90-140码不规则拼布长款T恤 ",
"cn_alphabet": "HAPPYATOMIC156005",
"good_id": 260257,
"goods_price": 11,
"goods_amount": 33,
"factory_color_name": "灰色",
"goods_image": null,
"goods_type": 1,
"expect_arrival_time": "",
"buy_num": 3,
"size_name": "130",
"color_name": "灰色"
}
]
}
]
}
2、查询微信抽奖活动信息
参与抽奖的订单列表(/activity/lottery/getLotteryInfo)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
lotteryId | int | 否 | 20 | null | 活动ID |
接口说明
注意,通用的头部没有列出。
请求示例
http://192.168.102.14:8090/activity/lottery/getLotteryInfo
参数:{"lotteryId":20}
响应
code为200即为成功,否则是失败。
响应参数,data部分
响应成功JSON格式如下所示: lottery为活动信息,prizes为奖品信息
{
"code": 200,
"message": "success",
"md5": "",
"data": {
"checkLotteryCode": null,
"checkLotteryMessage": null,
"lottery": {
"id": 20,
"name": "抽奖100% ——用户",
"startTime": 1420104180,
"endTime": 1422458580,
"userLimit": null,
"personTotal": null,
"limitByFlag": null,
"probability": null,
"pid": null,
"createTime": 1422437026,
"status": 1
},
"prizes": [
{
"id": null,
"lotteryId": 20,
"giftId": null,
"name": "优惠券",
"prizeType": null,
"prizeValue": "3502",
"total": null,
"remark": "啊",
"remain": 0,
"image": "/2015/01/27/05/01a75517703472e092e6be56c41f0813d4.jpg"
},
{
"id": null,
"lotteryId": 20,
"giftId": null,
"name": "yoho币",
"prizeType": null,
"prizeValue": "1",
"total": null,
"remark": "啊啊我6订单 5",
"remain": 0,
"image": "/2015/01/27/02/02e953d99fb77a073cb4fb1d6c50eceb1e.jpg"
},
{
"id": null,
"lotteryId": 20,
"giftId": null,
"name": "春节sdf",
"prizeType": null,
"prizeValue": "1",
"total": null,
"remark": "asfasf",
"remain": 2,
"image": "/2015/01/26/10/02745056f1bd0539c1a97bc000b51c88ec.jpg"
}
],
"orderLotteryCode": null,
"orderLotteryMessage": null,
"prize": null,
"lotteryRecordMap": null
}
}
3、查询微信抽奖活动信息
参与抽奖的订单列表(/activity/lottery/lucky)
请求参数
参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
---|---|---|---|---|---|
lotteryId | int | 否 | 20 | null | 活动ID |
userId | int | 否 | 4026038 | null | 活动ID |
orderCode | int | 否 | 308522798 | null | 活动ID |
接口说明
注意,通用的头部没有列出。
请求示例
http://192.168.102.14:8090/activity/lottery/lucky
参数:{"lotteryId":20,"userId":4026038,"orderCode":"308522798"}
响应
code为200即为成功,否则是失败。
响应参数,data部分
响应成功JSON格式如下所示: 没中奖
{
"code": 200,
"message": "success",
"md5": "",
"data": {
"checkLotteryCode": null,
"checkLotteryMessage": null,
"lottery": null,
"prizes": null,
"orderLotteryCode": 2,
"orderLotteryMessage": "差一点就中奖啦!",
"prize": null,
"lotteryRecordMap": null
}
}
响应成功JSON格式如下所示: 多个客户端同时抽奖
{
"code": 200,
"message": "success",
"md5": "",
"data": {
"checkLotteryCode": null,
"checkLotteryMessage": null,
"lottery": null,
"prizes": null,
"orderLotteryCode": 3,
"orderLotteryMessage": "用户抽奖不能多个客户端一起抽奖!",
"prize": null,
"lotteryRecordMap": null
}
}
``
响应成功JSON格式如下所示: 不符合抽奖条件
```json
{
"code": 200,
"message": "success",
"md5": "",
"data": {
"checkLotteryCode": null,
"checkLotteryMessage": null,
"lottery": null,
"prizes": null,
"orderLotteryCode": 3,
"orderLotteryMessage": "不符合抽奖条件",
"prize": null,
"lotteryRecordMap": null
}
}
响应成功JSON格式如下所示: 中奖
{
"code": 200,
"message": "success",
"md5": "",
"data": {
"checkLotteryCode": null,
"checkLotteryMessage": null,
"lottery": null,
"prizes": null,
"orderLotteryCode": 1,
"orderLotteryMessage": "恭喜您,中奖啦!",
"prize": {
"id": null,
"lotteryId": 20,
"giftId": null,
"name": "yoho币",
"prizeType": null,
"prizeValue": "1",
"total": null,
"remark": "啊啊我6订单 5",
"remain": 1,
"image": "/2015/01/27/02/02e953d99fb77a073cb4fb1d6c50eceb1e.jpg"
},
"lotteryRecordMap": null
}
}