组合商品
- 组合商品
- bshop
- product/frequent/sku/search 常用商品搜索
- product/promotion_sku/get 营销活动搜索
- product/sku/promotion 首页营销活动展示
- product/sku/get 获取指定分类的商品
- order/cart 购物车详情
- cart/update 更新购物车
- favorite/list/detail 收藏页详情
- order/detail 订单详情
- product/sku/search 商城搜索sku
- cart/get(纯后端)
- favorite/list/get 收藏列表(纯后端)
- order/submit(纯后端)
- product/keyword/sku/search (纯后端)
- station
- station/combine_goods/create 组合商品创建
- station/combine_goods/edit 组合商品编辑
- station/combine_goods/delete 组合商品删除
- station/combine_goods/detail 组合商品详情
- station/combine_goods/list 组合商品列表
- station/combine_goods/batch_edit 组合商品批量编辑
- station/combline_goods/sku_search 组合商品页搜索sku
- station/combline_goods/spu_search 组合商品页搜索spu
- station/order/create 创建订单
- station/order/create_old 补录订单
- station/order/edit 编辑订单
- station/order/edit 订单详情
- station/skus/addr 订单页搜索sku
- station/skus/recognize 文字识别
- station/skus/img/recognize 图片识别
- station/promotion/update 营销活动更新
- station/promotion/create 营销活动创建
- station/promotion/get 营销活动详情
- promotion/combline_goods/list 营销活动页面搜索组合商品
- station/order/batch/template/upload 订单批量导入
- station/promotion/delete 营销活动删除(纯后端)
- station/promotion/list 营销活动列表(纯后端)
- station/order/batch/submit 批量导入页全部保存(纯后端)
- station/order/batch/result 批量导入任务失败返回(纯后端)
- station/order/batch/export 批量导入旧模板数据导出(纯后端)
- 云管家
- order服务
- 刷下单频率脚本
组合商品
bshop
product/frequent/sku/search 常用商品搜索
请求:
无
响应:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M list: [
{
"spu_id": "C1376487",
"category_id_1": "A7666",
"clean_food": false,
"state": 1,
"limit_number": null,
"sale_unit_name": "斤",
"cart_amount": 0,
"stocks": -99999,
"name": "鸡比菇",
"is_valid": true,
"salemenu_id": "S12731",
"promotion_price": null,
"std_sale_price": 1800,
"station_id": "T7936",
"sale_num_least": 1.0,
"sale_ratio": 1.0,
"is_price_timing": false,
"category_id_2": "B37080",
"img_url": "https://img.guanmai.cn/product_pic/cda64228520e5b6f.jpg",
"sale_price": 1800,
"std_unit_name": "斤",
"id": "D7555673",
"desc": "",
"rule_price": null,
"frequency": 9,
"spu_img_url": "https://img.guanmai.cn/product_pic/cda64228520e5b6f.jpg",
### 新增
"conbine_goods_id": "M12345"
"conbine_goods_name": '鱼香肉丝'
"is_conbine_goods": true
}
]
product/promotion_sku/get 营销活动搜索
Method:
POST
请求
promotion_id M int
label_2_id O int
响应
msg M
code M
data M
cart_amount M int
id M str spu_id,
img_url M str
img_urls M list 商品图片列表
is_fav: false,
name: str,
rank: 0,
salemenu_id: str,
std_sale_price: int,
std_unit_name: str,
skus M list sku信息
cart_amount M int 购物车数量
category_id_1 M str
category_id_2 M str
label_2_id M
desc M str 描述
id M str sku_id,
img_url M str
img_urls M list
is_valid M bool
name M str 名称
rule_price M float
sale_num_least M int
sale_price M float 销售价格
sale_ratio M float
sale_unit_name M str 销售单位
salemenu_id M str 报价单id
spu_id M str
state M int
station_id M str
std_sale_price M float
std_unit_name M str
stocks M int 库存
promotion_price C float 活动价
limit_number C int 限购数
frequency M int
is_price_timing M bool 是否时价
clean_food M bool
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
]
}
]
product/sku/promotion 首页营销活动展示
Method: GET
请求:
无
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O list 成功时返回数据,json格式
[{
name: string 展示的名称
skus: [{ list 商品信息
img_url: spu图片链接,
id: spu_id,
name: spu名称,
is_fav: 是否已收藏,
std_unit_name: 基本单位,
std_sale_price: 售卖价格,
cart_amount: 加入购物车数量,
skus: [{
name: sku名称,
sale_unit_name: 售卖单位,
std_sale_price: 基本单位价格,
sale_ratio: 换算率(售卖单位/基本单位),
img_url: sku图片链接,
sale_num_least: 最小下单数量,
state: 上架状态(1:上架;0:下架),
category_id_1: 一级分类ID,
sale_price: 售卖价格,
is_valid: 是否有效(在用户的销售单内),
rule_price: 规则价格,
desc: 描述,
id: sku_id,
std_unit_name: 基本单位,
category_id_2: 二级分类ID,
stocks: 库存数量,
station_id: 站点ID,
cart_amount: 加入采购单数量,
salemenu_id: 销售单ID,
spu_id: spu_id,
sort_id: 排序ID(给有排序需求的站点使用)
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}],
salemenu_id: 销售单ID,
sort_id: 排序ID(给有排序需求的站点使用)
}]
}]
product/sku/get 获取指定分类的商品
Method: GET
请求:
category_id M string 分类ID
level O int 分类级别 默认一级分类
salemenu_ids O list 销售单ID列表
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O list 成功时返回数据,json格式
[{
img_url: spu图片链接,
id: spu_id,
name: spu名称,
is_fav: 是否已收藏,
std_unit_name: 基本单位,
std_sale_price: 售卖价格,
cart_amount: 加入购物车数量,
skus: [{
name: sku名称,
sale_unit_name: 售卖单位,
std_sale_price: 基本单位价格,
sale_ratio: 换算率(售卖单位/基本单位),
img_url: sku图片链接,
sale_num_least: 最小下单数量,
state: 上架状态(1:上架;0:下架),
category_id_1: 一级分类ID,
sale_price: 售卖价格,
is_valid: 是否有效(在用户的销售单内),
rule_price: 规则价格,
desc: 描述,
id: sku_id,
search_key: 搜索的二级分类ID 前端用,
std_unit_name: 基本单位,
category_id_2: 二级分类ID,
stocks: 库存数量,
station_id: 站点ID,
cart_amount: 加入采购单数量,
salemenu_id: 销售单ID,
spu_id: spu_id,
sort_id: 排序ID(给有排序需求的站点使用)
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}],
salemenu_id: 销售单ID,
sort_id: 排序ID(给有排序需求的站点使用)
}]
order/cart 购物车详情
Method: POST
request:
不变
response:
code M 1
msg M null
data M dict{
orders M list[{
discounted_price O float 订单的优惠金额
salemenus M list salemenu信息
[
skus M list sku信息
[{
promotion_price M float 活动价
using_promotion_amount O int sku此次参加限购活动的数量
promotion_amount O int sku限购数
sku_discounted_price O float sku优惠金额
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}]
]
all_discounted_price O float 全部优惠金额
}
cart/update 更新购物车
Method:
POST
请求:
skus M list 下单商品列表
# 新增
conbline_goods O list 组合商品
[
{
sku_id M str skuID
amount M int 下单数
conbline_good_id M str 组合商品ID
}
]
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O dict 成功时返回购物车信息,json格式
{
info M dict 购物车数据
{
count M int 购物车商品数量
sum_money M int 购物车商品总价
reward_sku_count M int 积分商品总数
is_price_timing M bool 是否时价
total_cost_points M int 商品总消耗积分
},
invalid_skus M list 无效商品信息
[{
code M int 错误码(1:商品下架;2:商品库存不足)
msg M string 错误提示
sku_id M string 商品ID
name M string 商品名
stocks O int 商品库存数量(商品库存不足时返回)
}],
reward_sku_list M dict 积分商品ID及数量
{
"RW123333":1
}
list M dict 购物车商品ID及数量
{
sku_id M string 商品ID及数量
}
}
favorite/list/detail 收藏页详情
Method: GET
请求:
id M int 列表id
响应:
code M int 返回码 0为成功、其他为错误
msg M string 信息提示
data O dict 成功时列表商品详细信息,json格式
{
name M string 常用列表名称
products M list 商品信息列表
[{
img_url: spu图片链接,
id: spu_id,
name: spu名称,
is_fav: 是否已收藏,
std_unit_name: 基本单位,
std_sale_price: 售卖价格,
cart_amount: 加入购物车数量,
skus: [{
name: sku名称,
sale_unit_name: 售卖单位,
std_sale_price: 基本单位价格,
sale_ratio: 换算率(售卖单位/基本单位),
img_url: sku图片链接,
sale_num_least: 最小下单数量,
state: 上架状态(1:上架;0:下架),
category_id_1: 一级分类ID,
sale_price: 售卖价格,
is_valid: 是否有效(在用户的销售单内),
rule_price: 规则价格,
desc: 描述,
id: sku_id,
search_key: 搜索的二级分类ID 前端用,
std_unit_name: 基本单位,
category_id_2: 二级分类ID,
stocks: 库存数量,
station_id: 站点ID,
cart_amount: 加入采购单数量,
salemenu_id: 销售单ID,
spu_id: spu_id,
sort_id: 排序ID(给有排序需求的站点使用)
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}],
salemenu_id: 销售单ID,
sort_id: 排序ID(给有排序需求的站点使用)
}]
}
order/detail 订单详情
Method:
GET
请求:
order_id 订单id
响应:
msg M str
code M int
data M dict
receive_way M int 收货方式
details M dict 详情
{
real_item_price M int 真实价格
real_quantity M int
is_promotion_sku M bool 是否促销的sku
purchase_quantity M int 采购的数量
remark M str 备注
id M str sku_id
name M str 名称
sale_num_least M int
sale_ratio M float
sale_unit_name M str 销售单位
spu_id M str
std_sale_price M float
std_unit_name M str
stocks M int 库存
is_price_timing M bool 是否时价
clean_food M bool
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}
],
product/sku/search 商城搜索sku
Method: GET
请求:
text M string 商品名称
响应:
code M int 返回码 0为成功、其他为错误
msg O string 出错信息提示
data O list 成功时返回数据,json格式
[{
img_url: spu图片链接,
id: spu_id,
name: spu名称,
is_fav: 是否已收藏,
std_unit_name: 基本单位,
std_sale_price: 售卖价格,
cart_amount: 加入购物车数量,
skus: [{
name: sku名称,
sale_unit_name: 售卖单位,
std_sale_price: 基本单位价格,
sale_ratio: 换算率(售卖单位/基本单位),
img_url: sku图片链接,
sale_num_least: 最小下单数量,
state: 上架状态(1:上架;0:下架),
category_id_1: 一级分类ID,
sale_price: 售卖价格,
is_valid: 是否有效(在用户的销售单内),
rule_price: 规则价格,
desc: 描述,
id: sku_id,
std_unit_name: 基本单位,
category_id_2: 二级分类ID,
stocks: 库存数量,
station_id: 站点ID,
cart_amount: 加入采购单数量,
salemenu_id: 销售单ID,
spu_id: spu_id,
sort_id: 排序ID(给有排序需求的站点使用)
}],
salemenu_id: 销售单ID,
sort_id: 排序ID(给有排序需求的站点使用)
}]
cart/get(纯后端)
favorite/list/get 收藏列表(纯后端)
order/submit(纯后端)
product/keyword/sku/search (纯后端)
station
station/combine_goods/create 组合商品创建
Method
POST
请求
name M str 组合商品名称
state M int 销售状态:0下架,1上架
desc O str 组合商品描述
salemenu_ids O str 可见报价单IDs
images M list 组合商品图片数组
spu_ids M list 组合商品spu数组
skus M list 组合商品sku数组
[
{
sku_id M skuID
sku_version M sku版本号
},
]
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
id M str 生成的商品创建id
station/combine_goods/edit 组合商品编辑
Method
POST
请求
id M str 组合商品ID
name M str 组合商品名称
state M int 销售状态:0下架,1上架
desc O str 组合商品描述
salemenu_ids O str 可见报价单IDs
images M list 组合商品图片数组
spu_ids M list 组合商品spu数组
skus M list 组合商品sku数组
[
{
sku_id M skuID
sku_version M sku版本号
},
]
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
station/combine_goods/delete 组合商品删除
Method
POST
请求
id M str 组合商品ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
station/combine_goods/detail 组合商品详情
Method
GET
请求
id M str 组合商品ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
data M dict 组合商品信息
{
id M str 组合商品ID
name M str 组合商品名称
state M int 销售状态:0下架,1上架
desc O str 组合商品描述
salemenu_ids O str 可见报价单IDs
images M list 组合商品图片数组
spus M dict 组合商品spu数组
{
spu_id : spu_name spuID : spu名称
}
skus M list 组合商品sku数组
[
{
sku_id M str skuID
salemenu_id M str 报价单id
version M int sku版本号
sale_price float 销售价
state M int 销售状态
}
]
}
station/combine_goods/list 组合商品列表
Method
GET
请求
search_text M str 组合商品ID
state O int 销售状态,0下架1上架,全部状态则不传
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
data M list 组合商品信息
[
{
id
name
images
state
salemenu
}
]
station/combine_goods/batch_edit 组合商品批量编辑
Method
POST
请求
ids M str 组合商品IDs
state M int 销售状态:0下架,1上架
desc O str 组合商品描述
salemenu_ids O str 可见报价单IDs
images M list 组合商品图片数组
spu_ids M list 组合商品spu数组
sku_ids M list 组合商品sku数组 # 这里需要讨论,是否拿快照而不是自己再去查
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
station/combline_goods/sku_search 组合商品页搜索sku
Method
GET
请求
search_text M str 搜索字段
sale_menu_id M str 报价单id
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
data M list sku信息
id M string SKUID
sync_origin_id M string 真实交易ID
spu_id M string SPUID
category_id_1 M string 一级分类ID
category_id_2 M string 二级分类ID
category_title_1 O string 一级分类名
category_title_2 O string 二级分类名
station_id M string 站点ID
salemenu_id M string 销售单ID
salemenu_name M string 销售单名称
supplier_name M string 供应商名
name M string 商品名字
desc M string 描述
sale_unit_name M string 销售单位名
std_unit_name M string 标准单位名
unit_price M float 标准单价
sale_ratio M float 售卖比例
sale_price M float 售卖单价
state M int 是否上架
is_weigh M int 是否称重
sale_num_least M float 最小售卖数
outer_id M string 自定义ID
is_price_timing M bool 是否时价
frequency O int 下单频次
stock_avg_price M int 库存均价
tax_rate O int 税率
price_origin M int 价格来源。1:价格来自报价单,2:价格来自索价
latest_in_stock_price M int 最近入库价 不存在为null
latest_quote_price M int 最近询价 不存在为null
imgs M str sku图片
clean_food M bool 是否为净菜
station/combline_goods/spu_search 组合商品页搜索spu
Method: GET
请求:
category1_ids O list 一级分类ID列表
category2_ids O list 二级分类ID列表
pinlei_ids O list 品类ID列表
q O string 查询参数(按SPU别名/SKU名,SPUID/SKUID搜索)
is_active_on O int 是否显示未激活销售单商品(0:不显示;1:显示 默认不显示)
offset O int 偏移量 默认0
limit O int 返回个数 默认10
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
pagination M dict 分页数据
{'count': 总数, 'offset': 当前偏移, 'limit': 个数}
data M list 返回的信息列表
[{
'spu_id' M string spu ID
'spu_name' M string 商品名
'category_name_1' M string 一级分类名称
'category_name_2' M string 二级分类名称
'pinlei_name' M string 品类ID
'p_type' M int 商品类型(0:通用;1:私有)
'std_unit_name' M string 基本单位
}]
station/order/create 创建订单
请求方法:POST
请求:
details M list
[
...
# 新增字段
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
]
address_id M str
uid M int
receive_begin_time M str
receive_end_time M str
time_config_id M str
remark O str
force O int
date_time M str
响应(不变):
code M int
data M dict
msg M str
例子:
request:
details:[{"sku_id":"D10597703","amount":"200","unit_price":"1.00","spu_remark":"","spu_id":"C1999240","is_price_timing":0, 'is_conbine_goods':true, 'conbine_goods_name':鱼香肉丝,'conbine_goods_id':'M12345'}],
address_id:"77838",
uid: 73655,
receive_begin_time: "2019-04-30 02:00",
receive_end_time: "2019-04-30 16:00",
time_config_id: "ST2034",
remark: "test hedan222",
date_time : "2019-04-29 20:01:17",
response:
{
"data": {
"update_order_ids": [
"PL5648359"
],
"success_sku_ids": [
"D10597703"
],
"detail_url": "/station/order/edit",
"new_order_ids": [
"PL5648359"
],
"not_enough_inventories": [],
"error_sku_ids": [],
"exceed_order_time_ids": []
},
"msg": "ok",
"code": 0
}
station/order/create_old 补录订单
请求方法:POST
请求:
details M list
[
...
# 新增字段
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
]
address_id M str
uid M int
receive_begin_time M str
receive_end_time M str
time_config_id M str
remark O str
force O int
date_time M str
响应(不变):
code M int
data M dict
msg M str
例子:
request:
details:[{"sku_id":"D10597703","amount":"200","unit_price":"1.00","spu_remark":"","spu_id":"C1999240","is_price_timing":0, 'is_conbine_goods':true, 'conbine_goods_name':鱼香肉丝,'conbine_goods_id':'M12345'}],
address_id:"77838",
uid: 73655,
receive_begin_time: "2019-04-30 02:00",
receive_end_time: "2019-04-30 16:00",
time_config_id: "ST2034",
remark: "test hedan222",
date_time : "2019-04-29 20:01:17",
response:
{
"data": {
"update_order_ids": [
"PL5648359"
],
"success_sku_ids": [
"D10597703"
],
"detail_url": "/station/order/edit",
"new_order_ids": [
"PL5648359"
],
"not_enough_inventories": [],
"error_sku_ids": [],
"exceed_order_time_ids": []
},
"msg": "ok",
"code": 0
}
station/order/edit 编辑订单
方法:
POST
请求:
order_id M String 待修改的订单 id
detials M List<Dict> 商品数据
[
{
sku_id M String sku_id
amount M Int 下单数量
unit_price M String 含税单价
spu_remark O String 商品备注
spu_id M String spu_id
is_price_timing M Int 是否时价 0否 1是
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}
]
order_data M Dict 订单数据
{
receive_begin_time M String 订单收货开始时间
receive_end_time M String 订单收货结束时间
remark O String 订单备注
}
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应内容
{
order_id M String 订单 id
}
station/order/edit 订单详情
方法:
GET
请求:
id M String 订单 id
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应消息
{
details M List<Dict> 订单详情数据列表
[
{
tax_rate M Int 税率
is_set_tax M Int 设置税率 0未设置 1已设置
std_real_quantity M Int 出库数(基本单位)
latest_quote_price M Int 最近询价
attrition_rate M Int 损耗率
outer_id M String 自定义编码
id M String sku_id
real_quantity M Int 称重后数量
sale_money M Int 订单金额
last_in_stock_price M Int 供应商最近入库价
exc_quantity M Int 异常数量
sale_unit_name M String 销售单位名称
is_print M Bool 是否打印
salemenu_id M Int 报价单 id
imgs M String sku image url
category_title_2 M String 二级分类名称
version M Int sku版本
accept_quantity M Int 收货数量
fake_item_price M Int 伪原价
category_title_1 M String 一级分类名称
stock_avg_price M Int 库存均价
is_price_timing M Bool 是否时价
latest_std_unit_name M String 最近基本单位的名称
spu_remark M String 商品备注
sorting_saleunit_weighting_quantity
M Int 称重数据
real_refund_quantity M Int 实际退货数
request_refund_quantity M Int 请求退货数
latest_in_stock_price M Int 最近入库价
clean_food M Bool 是否是净菜
purchase_quantity M Int 采购数量
origin_item_price M Int 锁价前价格
sale_num_least M Int 最小下单数
sync_origin M String 真实交易id
last_purchase_price M Int 供应商采购价
std_unit_name M String 基本单位名称
tax M String 税金
name M String sku名称
is_weigh M Int 是否称重
search_text M List<string>
搜索关键字列表
std_unit_quantity M Int 按基本单位计算的下单数
sale_ratio M Int 销售单位数量
latest_std_sale_price M Int 最近基本单位销售价
total_item_price M Int 商品总价格
quantity M Int 下单数量
real_item_price M Int 真实总价
std_sale_price M Int 基本单位价格
spu_id M String spu_id
last_quote_price M Int 供应商最近询价
total_item_pay M Int 商品应付总价
out_of_stock M Bool 是否缺货
weighting_quantity M Int 基本单位称重数
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
},
...
]
}
station/skus/addr 订单页搜索sku
Method:GET
请求:
不变
响应:
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
id M string SKUID
sync_origin_id M string 真实交易ID
spu_id M string SPUID
category_id_1 M string 一级分类ID
category_id_2 M string 二级分类ID
category_title_1 O string 一级分类名
category_title_2 O string 二级分类名
station_id M string 站点ID
salemenu_id M string 销售单ID
salemenu_name M string 销售单名称
supplier_name M string 供应商名
name M string 商品名字
desc M string 描述
sale_unit_name M string 销售单位名
std_unit_name M string 标准单位名
unit_price M float 标准单价
sale_ratio M float 售卖比例
sale_price M float 售卖单价
state M int 是否上架
is_weigh M int 是否称重
sale_num_least M float 最小售卖数
outer_id M string 自定义ID
is_price_timing M bool 是否时价
frequency O int 下单频次
stock_avg_price M int 库存均价
tax_rate O int 税率
price_origin M int 价格来源。1:价格来自报价单,2:价格来自索价
latest_in_stock_price M int 最近入库价 不存在为null
latest_quote_price M int 最近询价 不存在为null
imgs M str sku图片
clean_food M bool 是否为净菜
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
station/skus/recognize 文字识别
Method: GET
请求:
address_id M int 商户ID
recognition_text M string 智能识别的文字信息
time_config_id M string 时间配置ID
fetch_category O int 0-表示不拉取分类;1-表示拉取分类
active O int 0-表示拉取全部状态商品;1-表示只拉取有效的商品
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
data M dic {
index: M list [] 正则识别成功文字的索引,用于给前端标注哪些识别失败的地方
vaild M list 识别成功的sku
[[
id M string SKUID
sync_origin_id M string 真实交易ID
spu_id M string SPUID
category_id_1 M string 一级分类ID
category_id_2 M string 二级分类ID
category_title_1 O string 一级分类名
category_title_2 O string 二级分类名
station_id M string 站点ID
salemenu_id M string 销售单ID
salemenu_name M string 销售单名称
supplier_name M string 供应商名
name M string 商品名字
desc M string 描述
sale_unit_name M string 销售单位名
std_unit_name M string 标准单位名
unit_price M float 标准单价
sale_ratio M float 售卖比例
sale_price M float 售卖单价
state M int 是否上架
is_weigh M int 是否称重
sale_num_least M float 最小售卖数
outer_id M string 自定义ID
is_price_timing M bool 是否时价
frequency O int 下单频次
last_quote_price M int 最近询价
last_purchase_price M int 最近采购价
last_in_stock_price M int 最新入库价
stock_avg_price M int 库存均价
tax_rate O int 税率
price_origin M int 价格来源。1:价格来自报价单,2:价格来自索价
latest_in_stock_price M int 最近入库价 不存在为null
latest_quote_price M int 最近询价 不存在为null
imgs M str sku图片
clean_food M bool 是否为净菜
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
],]
error_num M int 识别失败的个数
station/skus/img/recognize 图片识别
请求:
address_id M int 商户ID
time_config_id M string 时间配置ID
file_list M list 文件列表
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
data M dic {
'vaild':[
[
{
id M str 商品ID
name M str 商品名
supplier_name M str 报价单名称(对外)
std_unit_name M str 销售单位
num O str 下单数
sale_price M str 含税单价(销售单位)
is_price_timing M bool 是否实价
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
},],
[{...}],
]
}
station/promotion/update 营销活动更新
方法:
POST
请求:
name M String 营销活动名称
active M Int 活动状态
show_method M Int 展示方式
sort M Int 展示优先级
enable_label_2 M Int 是否开启二级标签
label_1_name M String 以及标签名称
label_2 M List<Dict> 二级标签列表
[
{
id M String 二级标签id
name M String 二级标签名称
sort M String 二级标签排序
},
...
]
pic_url M String 营销活动图片
type M Int 营销活动类型
skus M List<Dict> 营销活动 sku 数据列表
[
{
state M Int 是否上架
name M String sku 名称
salemenu_name M String 报价单名称
id M String sku_id
value M String sku_id?
_gm_select M Bool
label_2_id M String 二级标签名称
label_2_name M String 二级标签名称
label_1_name M String 二级标签名称
},
...
]
响应:
code M Int 状态码
msg M String 状态消息
data O 响应消息
station/promotion/create 营销活动创建
方法:
POST
请求:
name M String 营销活动名称
active M Int 活动状态
show_method M Int 展示方式
sort M Int 展示优先级
enable_label_2 M Int 是否开启二级标签
label_1_name M String 以及标签名称
label_2 M List<Dict> 二级标签列表
[
{
id M String 二级标签id
name M String 二级标签名称
sort M String 二级标签排序
},
...
]
pic_url M String 营销活动图片
type M Int 营销活动类型
skus M List<Dict> 营销活动 sku 数据列表
[
{
state M Int 是否上架
name M String sku 名称
salemenu_name M String 报价单名称
id M String sku_id
value M String sku_id?
_gm_select M Bool
label_2_id M String 二级标签名称
label_2_name M String 二级标签名称
label_1_name M String 二级标签名称
},
...
]
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应消息
{
id M Int 营销活动id
}
station/promotion/get 营销活动详情
方法:
GET
请求:
id M Int 活动id
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应数据
{
active M Int 活动状态
cms_key M String cms_key
enable_label_2 M Int 是否开启二级标签
label_1_name M String 一级标签名字
label_2 M List<Dict> 二级标签数据
[
{
id M Int 二级标签id
name M String 二级标签名
sort M Int 展示优先级
},
...
]
name M String 活动名称
pic_url M String 活动图片
show_method M Int 展示类型
skus M List<Dict> 商品信息
[
{
id M String sku_id
img_url M Int sku图片
is_price_timing M bool 是否时价
label_1_name M String 一级标签名称
label_2_id M Int 二级标签id
label_2_name M String 二级标签名称
last_in_stock_price M Int 供应商最近入库价
last_purchase_price M Int 供应商最近采购价
last_quote_price M Int 供应商最近询价
latest_in_stock_price M Int 最近入库价
latest_quote_price M Int 最近询价
limit_number M Int 限购数量
name M Int 商品名
price M Int 活动价
sale_price M Int 当前定价
sale_unit_name M String 销售规格名称
salemenu_name M String 报价单名称
state: 1 M String 是否上架(1 上架 0 下架)
std_unit_name M String 基本单位名称
stock_avg_price M Int 库存均价
},
...
]
sort M Int 位置排序
type M Int 活动类型
}
promotion/combline_goods/list 营销活动页面搜索组合商品
Method
GET
请求
search_text M str 组合商品ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
data M list 组合商品信息
[
{
id
name
images
state
salemenu
}
]
station/order/batch/template/upload 订单批量导入
请求:
time_config_id M string 时间配置ID
file M excel文件
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
data M dict 解析的数据
{
task_id M string 任务ID
details M list 商户和商品数据
[{
address_id M string 商户ID
id M string 用户ID
resname M string 店铺名
receiver_name M string 收货人姓名
receiver_phone M string 收货人电话
address M string 收货地址
code M int 解析结果(0:正常;1:有错误) # # 前端根据code判断商户名是否有效
msg M string 错误提示
skus M list 商品列表
[
sku_name M string 表格填写的商品名
code M int 解析结果(0:正常;1:有错误) # 前端根据code判断商品名是否有效
sku_num M string 表格填写的下单数
remark O string 表格填写的备注
price O string 表格填写的价格
sku_data M list 单个sku名识别内容
[{
id M string 商品ID
name M string 商品名
desc M string 商品描述
supplier_name M string 供应商名称
spu_id M string spu ID
category_id_1 M string 一级分类ID
category_title_1 M string 一级分类名
category_id_2 M string 二级分类ID
category_title_2 M string 二级分类名
station_id M string 站点ID
salemenu_id M string 销售单ID
sale_unit_name M string 售卖单位
std_unit_name M string 标准单位
unit_price M float 单价
sale_price M float 售卖价
sale_ratio M float 规格
sale_num_least float 最小下单数量
outer_id string M string 自定义编码
is_price_timing M bool 是否实价
quantity M float 下单数量
spu_remark M string 商品备注
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
},]
},
]
}
station/promotion/delete 营销活动删除(纯后端)
station/promotion/list 营销活动列表(纯后端)
station/order/batch/submit 批量导入页全部保存(纯后端)
station/order/batch/result 批量导入任务失败返回(纯后端)
station/order/batch/export 批量导入旧模板数据导出(纯后端)
云管家
manage/ordermanage/order/create 创建订单
请求方法:POST
请求:
details M list
[
...
# 新增字段
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
]
address_id M str
uid M int
receive_begin_time M str
receive_end_time M str
time_config_id M str
remark O str
force O int
date_time M str
响应(不变):
code M int
data M dict
msg M str
例子:
request:
details:[{"sku_id":"D10597703","amount":"200","unit_price":"1.00","spu_remark":"","spu_id":"C1999240","is_price_timing":0, 'is_conbine_goods':true, 'conbine_goods_name':鱼香肉丝,'conbine_goods_id':'M12345'}],
address_id:"77838",
uid: 73655,
receive_begin_time: "2019-04-30 02:00",
receive_end_time: "2019-04-30 16:00",
time_config_id: "ST2034",
remark: "test hedan222",
date_time : "2019-04-29 20:01:17",
response:
{
"data": {
"update_order_ids": [
"PL5648359"
],
"success_sku_ids": [
"D10597703"
],
"detail_url": "/station/order/edit",
"new_order_ids": [
"PL5648359"
],
"not_enough_inventories": [],
"error_sku_ids": [],
"exceed_order_time_ids": []
},
"msg": "ok",
"code": 0
}
manage/ordermanage/order/edit 编辑订单
方法:
POST
请求:
order_id M String 待修改的订单 id
detials M List<Dict> 商品数据
[
{
sku_id M String sku_id
amount M Int 下单数量
unit_price M String 含税单价
spu_remark O String 商品备注
spu_id M String spu_id
is_price_timing M Int 是否时价 0否 1是
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}
]
order_data M Dict 订单数据
{
receive_begin_time M String 订单收货开始时间
receive_end_time M String 订单收货结束时间
remark O String 订单备注
}
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应内容
{
order_id M String 订单 id
}
manage/ordermanage/order/detail 订单详情
方法:
GET
请求:
id M String 订单 id
响应:
code M Int 状态码
msg M String 状态消息
data M Dict 响应消息
{
details M List<Dict> 订单详情数据列表
[
{
tax_rate M Int 税率
is_set_tax M Int 设置税率 0未设置 1已设置
std_real_quantity M Int 出库数(基本单位)
latest_quote_price M Int 最近询价
attrition_rate M Int 损耗率
outer_id M String 自定义编码
id M String sku_id
real_quantity M Int 称重后数量
sale_money M Int 订单金额
last_in_stock_price M Int 供应商最近入库价
exc_quantity M Int 异常数量
sale_unit_name M String 销售单位名称
is_print M Bool 是否打印
salemenu_id M Int 报价单 id
imgs M String sku image url
category_title_2 M String 二级分类名称
version M Int sku版本
accept_quantity M Int 收货数量
fake_item_price M Int 伪原价
category_title_1 M String 一级分类名称
stock_avg_price M Int 库存均价
is_price_timing M Bool 是否时价
latest_std_unit_name M String 最近基本单位的名称
spu_remark M String 商品备注
sorting_saleunit_weighting_quantity
M Int 称重数据
real_refund_quantity M Int 实际退货数
request_refund_quantity M Int 请求退货数
latest_in_stock_price M Int 最近入库价
clean_food M Bool 是否是净菜
purchase_quantity M Int 采购数量
origin_item_price M Int 锁价前价格
sale_num_least M Int 最小下单数
sync_origin M String 真实交易id
last_purchase_price M Int 供应商采购价
std_unit_name M String 基本单位名称
tax M String 税金
name M String sku名称
is_weigh M Int 是否称重
search_text M List<string>
搜索关键字列表
std_unit_quantity M Int 按基本单位计算的下单数
sale_ratio M Int 销售单位数量
latest_std_sale_price M Int 最近基本单位销售价
total_item_price M Int 商品总价格
quantity M Int 下单数量
real_item_price M Int 真实总价
std_sale_price M Int 基本单位价格
spu_id M String spu_id
last_quote_price M Int 供应商最近询价
total_item_pay M Int 商品应付总价
out_of_stock M Bool 是否缺货
weighting_quantity M Int 基本单位称重数
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
},
...
]
}
manage/merchandise/skus/list 订单页搜索sku
Method: GET
请求:
address_id M string 商户id
time_config_id M string 运营时间
usual_type O int 搜索类型,1:展示常用商品
search_text O string 商品名称、sku_id或spu_id、自定义编码
limit
offset
响应:
code M int 0为成功,其它为失败
msg M string 错误提示信息
data M list 返回的商品列表
[{
'category_id_1': M string 一级分类ID
'category_name_1': M string 一级分类名
'category_id_2': M string 二级分类ID
'category_name_2': M string 二级分类名
'pinlei_id': M string 品类ID
'pinlei_name': M string 品类名
'spu_id': M string spu ID
'spu_name': M string spu名称
'sku_id': M string 商品ID
'sku_name': M string 商品名
'std_unit_name': M string 标准单位
'std_sale_price' M int 标准价(分)
'sale_unit_name': M string 售卖单位
'sale_ratio': M float 售卖规格
'sale_price': M int 售卖价(分)
# 新增
conbine_goods_id O str 组合商品ID
conbine_goods_name O str 组合商品名
is_conbine_goods M bool 是否为组合商品
}]
}
]
order服务
微服务接口若干