Skip to content

商品批量新建方案

权限

新增批量创建商品SPU(导入)、移动商品分类权限
待补充。。。

/merchandise/batch_create/import(新增接口)

描述
    批量新建商品
Method
    POST
请求
    salemenus           O            list             销售商品所在报价单ids
    pic                 M            file             导入商品图片
    excel               M            file             导入商品excel表格
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{                  M       dict            返回数据容器
            task_id: 1          M       int             任务id
        },             
        msg:"ok"                M       str             错误提示信息
    }

/merchandise/spu/create

描述
    新建商品
Method
    POST
请求
    新增自定义编码参数
    customize_code         O        str         自定义编码 
    。。。
响应
    不变

/merchandise/spu/update

描述
    商品详情修改
Method
    POST
请求
    新增自定义编码参数
    customize_code         O        str         自定义编码 
    。。。
响应
    不变

/merchandise/spu/details

描述
    商品详情获取
Mrthod
    GET
请求
    不变
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{                  M       dict            返回数据容器
            customize_code      O       str             自定义编码
            。。。
            其余不变
        },             
        msg:"ok"                M       str             错误提示信息
    }

/merchandise/spu/batch_update(新增接口)

描述
    批量修改spu
Mrthod
    POST
请求
    spu_list: [{
              id                M         str          spu_id
              category_id_1     O         str          一级分类id
              category_id_2     O         str          二级分类id
              pinlei_id         O         str          品类id
    },...]
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok"                M       str             错误提示信息
    }

/merchandise/category1/batch_update(新增接口)

描述
    批量修改一级分类
Mrthod
    POST
请求
    category1_list: [{
              id                M         str          一级分类id
              其余可选
              ...
    },...]
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok"                M       str             错误提示信息
    }

/merchandise/category2/batch_update(新增接口)

描述
    批量修改二级分类
Mrthod
    POST
请求
    category2_list: [{
             id                M         str          二级分类id
             其余可选
             ...
    },...]
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok"                M       str             错误提示信息
    }

/merchandise/pinlei/batch_update(新增接口)

描述
    批量修改品类分类
Mrthod
    POST
请求
    pinlei_list: [{
              id                M         str          品类id
              其余可选
              ...
    },...]
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok"                M       str             错误提示信息
    }

/product/sku_supplier/list_new

描述
    获取供应商列表
Mrthod
    GET
请求
    不变
响应
    {
        code:0,                 M       int             0为成功, 其它为失败
        data:{},                M       dict            返回数据容器
        msg:"ok"                M       str             错误提示信息
    }
示例:
    data: {
        recommend_suppliers: [{ M       list            推荐供应商
            id: T11365          M       str             供应商id
            name: shuiguo       M       str             供应商名称
            upstream: 2         M       int     
        }]     
        other_suppliers         M       list            其他供应商
        与上相同
    }

开发时间计划

/merchandise/batch_create/import  2.5天
/merchandise/spu/update           0.5天
/merchandise/spu/details          0.5天
/merchandise/spu/move             1.5天
总计5天