订单导入模板迭代
Station工程
station/order/batch/template/create 订单导入模板创建
Method
POST
请求
name M str 模板名称
type M int 模板类型:1系统,2连锁加盟
row_title M int 标题所在行
### 以下参数type为2时必传
row_address O int 商户所在行
cycle_start O int 开始循环列
cycle_col O int 循环间隔列数
relationship M dict 映射关系
{
resname M dict
{
name M str 商户名
col_index M int 列索引
}
skuname M dict 商品名
{
name M str 商户名
col_index M int 列索引
}
skunum M dict 下单数
{
name M str 商户名
col_index M int 列索引
}
sid O dict 商户id
{
name M str 商户名
col_index M int 列索引
}
skuid O dict 商品id
{
name M str 商户名
col_index M int 列索引
}
outer_id O dict 自定义编码
{
name M str 商户名
col_index M int 列索引
}
remark O dict 商品备注
{
name M str 商户名
col_index M int 列索引
}
price M str 单价
{
name M str 商户名
col_index M int 列索引
}
}
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
id M str 生成的订单导入模板id
station/order/batch/template/delete 订单导入模板删除
Method
POST
请求
id M str 模板id
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
station/order/batch/template/edit 订单导入模板编辑
Method
POST
请求
id M. str 模板id
name M str 模板名称
type M int 模板类型:1系统,2连锁加盟
row_title M int 标题所在行
### 以下参数type为2时必传
row_address O int 商户所在行
cycle_start O int 开始循环列
cycle_col O int 循环间隔列数
relationship M dict 映射关系
{
resname M dict
{
name M str 商户名
col_index M int 列索引
}
skuname M dict 商品名
{
name M str 商户名
col_index M int 列索引
}
skunum M dict 下单数
{
name M str 商户名
col_index M int 列索引
}
sid O dict 商户id
{
name M str 商户名
col_index M int 列索引
}
skuid O dict 商品id
{
name M str 商户名
col_index M int 列索引
}
outer_id O dict 自定义编码
{
name M str 商户名
col_index M int 列索引
}
remark O dict 商品备注
{
name M str 商户名
col_index M int 列索引
}
price M str 单价
{
name M str 商户名
col_index M int 列索引
}
响应
code M int 返回码,0表示成功,其他表示错误
msg M str 错误信息
station/order/batch/template/detail 订单导入模板详情
Method
GET
请求
id M str 模板id
响应
name M str 模板名称
type M int 模板类型:1系统,2连锁加盟
row_title M int 标题所在行
row_address O int 商户所在行
cycle_start O int 开始循环列
cycle_col O int 循环间隔列数
relationship M dict 映射关系
{
resname M dict
{
name M str 商户名
col_index M int 列索引
}
skuname M dict 商品名
{
name M str 商户名
col_index M int 列索引
}
skunum M dict 下单数
{
name M str 商户名
col_index M int 列索引
}
sid O dict 商户id
{
name M str 商户名
col_index M int 列索引
}
skuid O dict 商品id
{
name M str 商户名
col_index M int 列索引
}
outer_id O dict 自定义编码
{
name M str 商户名
col_index M int 列索引
}
remark O dict 商品备注
{
name M str 商户名
col_index M int 列索引
}
price M str 单价
{
name M str 商户名
col_index M int 列索引
}
station/order/batch/template/list 订单导入模板搜索
Method
GET
请求
search_text O str 搜索字段
offset O
limit O
响应
template_list M list 模板列表[
{
id M str 模板id
name M str 模板名,
create_time M str 创建时间,
creator M str 创建人,
type M int 模板类型 1系统,2连锁门店
},
]
station/order/batch/template/download 订单导入模板下载
Method
GET
请求
id M str 模板id
响应
excel文件
station/order/batch/template/upload 订单模板上传
Method: POST
请求:
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 商品备注
},]
},
]
}
station/order/batch/template/result 查看导入失败的结果
Method: POST
请求:
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:有错误)
msg M string 错误提示
skus M list 商品列表
[{
id M string 商品ID
code M int 解析结果(0:正常;1:有错误)
msg M string 错误提示
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 商品备注
}]
}
Mongo表设计
表名 base -> xnn_core_product_2 -> order_import_template
name string 模板名称
type int 模板类型:1系统,2连锁加盟
row_title int 标题所在行
row_address int 商户所在行
cycle_start int 开始循环列
cycle_col int 循环间隔列数
relationship object 映射关系
{
resname string 商户名
skuname string 商品名
skunum string 下单数
sid string 商户id
skuid string 商品id
outerid string 自定义编码
remark string 商品备注
}