跳至主要內容

商城数据

Alex大约 18 分钟开发文档API接口文档

商城数据

收藏的商品-根据SKU

POST 收藏的商品

POST /front/shop/userFavoritesItem/add

收藏的商品

请求参数

名称位置类型必选说明
item_idqueryintegeritem_id

返回示例

200 Response

{
  "code": 0,
  "data": {},
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
201Createdopen in new windowCreatedInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

GET 收藏的商品列表

GET /front/shop/userFavoritesItem/lists

收藏的商品列表

请求参数

名称位置类型必选说明
createTimeEndquerystring创建时间结束值
createTimeStartquerystring创建时间起始值
favoritesItemIdqueryinteger收藏编号
favoritesItemTimequeryinteger收藏时间
itemIdqueryinteger商品编号
like[0].columnquerystring搜索字段
like[0].likequerystring搜索字符
order[0].sidxquerystring排序字段
order[0].sortquerystring排序方式
pagequeryinteger分页查询页码
sidxquerystringnone
sizequeryinteger分页查询每页数量
sortquerystring排序方式
userIdqueryinteger用户编号

返回示例

200 Response

{
  "code": 0,
  "data": {
    "items": [
      {
        "favorites_item_id": 0,
        "favorites_item_time": 0,
        "item_id": 0,
        "item_unit_price": 0,
        "product_image": "string",
        "product_item_name": "string",
        "user_id": 0
      }
    ],
    "page": 0,
    "records": 0,
    "size": 0,
    "total": 0
  },
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

POST 收藏的商品删除

POST /front/shop/userFavoritesItem/remove

收藏的商品删除

请求参数

名称位置类型必选说明
item_idqueryintegeritem_id

返回示例

200 Response

{
  "code": 0,
  "data": {},
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
201Createdopen in new windowCreatedInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

商城移动端首页

GET 返回搜索关键词

GET /front/shop/mobile/getSearchInfo

用户最新搜索记录及系统推荐搜索关键词

返回示例

200 Response

{
  "code": 0,
  "data": {
    "search_history_words": [
      "string"
    ],
    "search_hot_words": [
      "string"
    ],
    "suggest_search_words": {
      "default_search_label": "string",
      "default_search_words": "string"
    }
  },
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

商品浏览历史表-SPU-不应该直接存数据库

GET 商品浏览历史表-SPU-不应该直接存数据库-分页列表查询

GET /front/shop/userProductBrowse/list

商品浏览历史表-SPU-不应该直接存数据库-分页列表查询

请求参数

名称位置类型必选说明
browseDatequerystring浏览日期
browseTimequeryinteger浏览时间
categoryIdqueryinteger商品分类
createTimeEndquerystring创建时间结束值
createTimeStartquerystring创建时间起始值
itemIdqueryinteger商品编号
like[0].columnquerystring搜索字段
like[0].likequerystring搜索字符
order[0].sidxquerystring排序字段
order[0].sortquerystring排序方式
pagequeryinteger分页查询页码
productBrowseIdqueryinteger浏览编号
sidxquerystringnone
sizequeryinteger分页查询每页数量
sortquerystring排序方式
userIdqueryinteger会员编号

返回示例

200 Response

{
  "code": 0,
  "data": [
    {
      "activity_type_id": 0,
      "activity_type_name": "string",
      "browse_date": "2019-08-24T14:15:22Z",
      "browse_time": 0,
      "category_id": 0,
      "item_id": 0,
      "item_sale_price": 0,
      "product_browse_id": 0,
      "product_image": "string",
      "product_item_name": "string",
      "user_id": 0
    }
  ],
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

POST 商品浏览历史删除

POST /front/shop/userProductBrowse/removeBrowser

商品浏览历史删除

请求参数

名称位置类型必选说明
browseDatequerystring浏览日期
browseTimequeryinteger浏览时间
categoryIdqueryinteger商品分类
createTimeEndquerystring创建时间结束值
createTimeStartquerystring创建时间起始值
itemIdqueryinteger商品编号
like[0].columnquerystring搜索字段
like[0].likequerystring搜索字符
order[0].sidxquerystring排序字段
order[0].sortquerystring排序方式
pagequeryinteger分页查询页码
productBrowseIdqueryinteger浏览编号
sidxquerystringnone
sizequeryinteger分页查询每页数量
sortquerystring排序方式
userIdqueryinteger会员编号

返回示例

200 Response

{
  "code": 0,
  "data": {},
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
201Createdopen in new windowCreatedInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

会员优惠券

POST 领取代金券

POST /front/shop/userVoucher/add

领取代金券

请求参数

名称位置类型必选说明
activity_idqueryintegeractivity_id

返回示例

200 Response

{
  "code": 0,
  "data": {},
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
201Createdopen in new windowCreatedInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

GET 读取优惠券信息

GET /front/shop/userVoucher/get

读取优惠券信息

请求参数

名称位置类型必选说明
activity_idqueryintegeractivity_id
user_voucher_idqueryintegeruser_voucher_id
currency_idqueryintegercurrency_id

返回示例

200 Response

{
  "code": 0,
  "data": {
    "activity_id": 0,
    "activity_name": "string",
    "activity_rule": "string",
    "activity_rule_json": {
      "cutPrice": {
        "cut_down_fixed_price": 0,
        "cut_down_max_price": 0,
        "cut_down_min_limit_price": 0,
        "cut_down_min_price": 0,
        "cut_down_type": 0,
        "cut_down_user_num": 0,
        "item_id": 0,
        "item_name": "string",
        "item_unit_price": 0,
        "product_image": "string"
      },
      "giftBag": {
        "activity_bag_category": "string",
        "activity_detail_intro": "string",
        "activity_video": "string",
        "giftbag_amount": 0,
        "giftbag_image": "string",
        "giftbag_quantity": 0,
        "giftbag_zu_image": "string",
        "transport_type_id": 0
      },
      "groupBooking": {
        "group_fixed_amount": 0
      },
      "groupBuyStore": {
        "group_buy_limit": 0,
        "group_quantity": 0,
        "group_sale_price": 0,
        "group_sale_quantity": 0,
        "product_id": 0,
        "product_image": "string",
        "product_unit_price": 0
      },
      "lottery": {
        "lottery_award": "string",
        "lottery_awards_times": 0,
        "lottery_day_times": 0,
        "lottery_image": "string",
        "lottery_max_awards_times": 0,
        "lottery_not_awards_remark": "string",
        "lottery_probability": "string",
        "lottery_share_add_times": 0,
        "lottery_subtitle": "string",
        "lottery_type": 0,
        "lottery_used_times": 0
      },
      "marketing": {
        "activity_address": "string",
        "activity_co_sponsor": "string",
        "activity_detail_intro": "string",
        "activity_image": "string",
        "activity_process": "string",
        "activity_sponsor": "string",
        "contact_organizer": "string",
        "contact_phone": 0,
        "end_join_time": 0,
        "guest_image": "string",
        "start_join_time": 0
      },
      "popUp": {
        "pop_up_image": "string",
        "pop_up_type": 0,
        "pop_up_url": "string"
      },
      "requirement": {
        "buy": {
          "item": [
            0
          ],
          "subtotal": 0
        },
        "points": {
          "needed": 0
        }
      },
      "rule": [
        {
          "item": [
            0
          ],
          "max_num": 0,
          "points_double": 0,
          "points_standard": 0,
          "total": 0
        }
      ],
      "voucher": {
        "voucher_end_date": 0,
        "voucher_image": "string",
        "voucher_pre_quantity": 0,
        "voucher_price": 0,
        "voucher_product_limit": 0,
        "voucher_quantity": 0,
        "voucher_quantity_free": 0,
        "voucher_quantity_use": 0,
        "voucher_start_date": 0
      }
    },
    "activity_state": 0,
    "id": 0,
    "item_id": "string",
    "item_ids": [
      "string"
    ],
    "order_id": "string",
    "store_id": 0,
    "store_name": "string",
    "user_id": 0,
    "user_voucher_activetime": "2019-08-24T14:15:22Z",
    "user_voucher_id": 0,
    "user_voucher_time": "2019-08-24T14:15:22Z",
    "voucher_effect": false,
    "voucher_end_date": 0,
    "voucher_price": 0,
    "voucher_start_date": 0,
    "voucher_state_id": 0,
    "voucher_subtotal": 0,
    "voucher_type": 0,
    "writeoff_code": "string"
  },
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

GET 列举出不同优惠券的数量

GET /front/shop/userVoucher/getEachVoucherNum

列举出不同优惠券的数量

请求参数

名称位置类型必选说明
voucher_state_idqueryintegervoucher_state_id

返回示例

200 Response

{
  "code": 0,
  "data": {
    "voucher_all_num": 0,
    "voucher_carcoupon_num": 0,
    "voucher_offlined_num": 0,
    "voucher_onlined_num": 0,
    "voucher_timeout_num": 0,
    "voucher_unused_num": 0,
    "voucher_used_num": 0
  },
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline

GET 会员优惠券列表

GET /front/shop/userVoucher/list

会员优惠券列表

请求参数

名称位置类型必选说明
activityIdqueryinteger代金券模版编号
createTimeEndquerystring创建时间结束值
createTimeStartquerystring创建时间起始值
itemIdquerystring单品优惠商品编号(DOT)
like[0].columnquerystring搜索字段
like[0].likequerystring搜索字符
orderIdquerystring订单编号
order[0].sidxquerystring排序字段
order[0].sortquerystring排序方式
pagequeryinteger分页查询页码
sidxquerystring排序字段
sizequeryinteger分页查询每页数量
sortquerystring排序方式
storeIdqueryinteger所属店铺编号
userIdqueryinteger所属用户
userVoucherActivetimequerystring使用时间
userVoucherIdqueryinteger代金券编号
userVoucherTimequerystring代金券发放日期
voucherEffectquerystring优惠券是否生效(BOOL): false-未生效;true-生效
voucherEndDatequerystring失效日期
voucherPricequerynumber优惠券可抵扣价格
voucherStartDatequerystring到期使用时间
voucherStateIdqueryinteger代金券状态(ENUM):1501-未用;1502-已用;1503-过期;1504-收回
voucherSubtotalquerynumber使用优惠券的订单金额
voucherTypequeryinteger优惠券类型(ENUM): 0-普通优惠券;1-免拼券
voucherUserWayqueryinteger使用方式
writeoffCodequerystring线下活动提货码

返回示例

200 Response

{
  "code": 0,
  "data": {
    "items": [
      {
        "activity_id": 0,
        "activity_name": "string",
        "activity_rule": "string",
        "activity_rule_json": {
          "cutPrice": {
            "cut_down_fixed_price": 0,
            "cut_down_max_price": 0,
            "cut_down_min_limit_price": 0,
            "cut_down_min_price": 0,
            "cut_down_type": 0,
            "cut_down_user_num": 0,
            "item_id": 0,
            "item_name": "string",
            "item_unit_price": 0,
            "product_image": "string"
          },
          "giftBag": {
            "activity_bag_category": "string",
            "activity_detail_intro": "string",
            "activity_video": "string",
            "giftbag_amount": 0,
            "giftbag_image": "string",
            "giftbag_quantity": 0,
            "giftbag_zu_image": "string",
            "transport_type_id": 0
          },
          "groupBooking": {
            "group_fixed_amount": 0
          },
          "groupBuyStore": {
            "group_buy_limit": 0,
            "group_quantity": 0,
            "group_sale_price": 0,
            "group_sale_quantity": 0,
            "product_id": 0,
            "product_image": "string",
            "product_unit_price": 0
          },
          "lottery": {
            "lottery_award": "string",
            "lottery_awards_times": 0,
            "lottery_day_times": 0,
            "lottery_image": "string",
            "lottery_max_awards_times": 0,
            "lottery_not_awards_remark": "string",
            "lottery_probability": "string",
            "lottery_share_add_times": 0,
            "lottery_subtitle": "string",
            "lottery_type": 0,
            "lottery_used_times": 0
          },
          "marketing": {
            "activity_address": "string",
            "activity_co_sponsor": "string",
            "activity_detail_intro": "string",
            "activity_image": "string",
            "activity_process": "string",
            "activity_sponsor": "string",
            "contact_organizer": "string",
            "contact_phone": 0,
            "end_join_time": 0,
            "guest_image": "string",
            "start_join_time": 0
          },
          "popUp": {
            "pop_up_image": "string",
            "pop_up_type": 0,
            "pop_up_url": "string"
          },
          "requirement": {
            "buy": {
              "item": [
                0
              ],
              "subtotal": 0
            },
            "points": {
              "needed": 0
            }
          },
          "rule": [
            {
              "item": [
                0
              ],
              "max_num": 0,
              "points_double": 0,
              "points_standard": 0,
              "total": 0
            }
          ],
          "voucher": {
            "voucher_end_date": 0,
            "voucher_image": "string",
            "voucher_pre_quantity": 0,
            "voucher_price": 0,
            "voucher_product_limit": 0,
            "voucher_quantity": 0,
            "voucher_quantity_free": 0,
            "voucher_quantity_use": 0,
            "voucher_start_date": 0
          }
        },
        "activity_state": 0,
        "id": 0,
        "item_id": "string",
        "item_ids": [
          "string"
        ],
        "order_id": "string",
        "store_id": 0,
        "store_name": "string",
        "user_id": 0,
        "user_voucher_activetime": "2019-08-24T14:15:22Z",
        "user_voucher_id": 0,
        "user_voucher_time": "2019-08-24T14:15:22Z",
        "voucher_effect": false,
        "voucher_end_date": 0,
        "voucher_price": 0,
        "voucher_start_date": 0,
        "voucher_state_id": 0,
        "voucher_subtotal": 0,
        "voucher_type": 0,
        "writeoff_code": "string"
      }
    ],
    "page": 0,
    "records": 0,
    "size": 0,
    "total": 0
  },
  "error": "string",
  "msg": "string",
  "status": 0
}

返回结果

状态码状态码含义说明数据模型
200OKopen in new windowOKInline
401Unauthorizedopen in new windowUnauthorizedInline
403Forbiddenopen in new windowForbiddenInline
404Not Foundopen in new windowNot FoundInline