Skip to content

技术方案

manage

report/customer_order/static 订单分析

Method: POST
请求
    q_type                                 M  int   1:下单时间;3:收货时间;2:运营周期,4: 出库时间 
    start_time                             M  date  开始时间
    end_time                               M  date  结束时间
    q                                      M  str   商户名或商户id   
    station_list                           M  list  station_id列表
    salemenu_ids                           0  list  报价单id列表
    address_label_id                       0  int   当值为-1时表示没有标签
响应    
    code                                   M   int     正常返回0
    msg                                    M   str     正常返回"ok"
    data{                                  M   dict
        account_price                      M   float   销售额(含运费)
        account_price_exclude_freight      M   float   销售额(不含运费)
        sale_profit_exclude_freight        M   float   销售毛利(不含运费)
        sale_profit                        M   float   销售毛利(含运费)
        sale_profit_rate_exclude_freight   M   float   销售毛利率(不含运费)
        sale_profit_rate                   M   float   销售毛利(含运费)
        date_detail_list                   M   list[{
            date                           M   date    日期
            order_price                    M   float   下单金额
            outstock_price                 M   float   出库额
            account_price                  M   float   销售额(含运费)
            account_price_exclude_freight  M   float   销售额(不含运费)
            sale_profit                    M   float   销售毛利
            order_cost                     M   float   实际成本
        }]    
"        order_price_top_list              M   list[{
            shop_id                        M   str     店铺ID
            shop_name                      M   str     店铺名
            order_price                    M   float   下单金额
        }]    
        order_count_top_list               M   list[{
            shop_id                        M   str     店铺ID
            shop_name                      M   str     店铺名
            order_count                    M   int     下单数量
        }]
    }

report/order/list 订单分析明细聚合详情

Method: POST
请求
    q_type                          M  int      1:下单时间;3:收货时间;2.运营周期; 4: 出库时间 
    start_time                      M  date     开始时间
    end_time                        M  date     结束时间
    q                               M  str      过滤条件。商户名或商户id  
    aggerate_list                   M  list     聚合条件列表。只有三个。1.date(按每日);2:station_id(按站点);3.shop_id(按商户)
    sort                            M  list[
    {
        fileds                      M  int      排序的字段。值有8个类型。1.date(日期);2.station_id(站点ID);
                                                3.shop_id(商户ID);4.order_count(下单数量);5.order_price(订单金额);6.account_price(销售额(不含运费));7.outstock_cost(出库成本);8.sale_profit(销售毛利率)
        opt                         M  int      排序类型。值有两个类型。1.asc(升序_;2.desc(降序)。
    },...
    ]
    offest                          M  int     起始位置     
    limit                           M  int     返回数量
    station_list                    M  list    station_id列表 
    address_label_id                0  int   当值为-1时表示没有标签
响应
    code                                   M   int     正常返回0
    msg                                    M   str     正常返回"ok"
    data                                   M   dict {
        detail_list                        M   list[{
            date                           M   str     日期
            station_id                     M   str     站点ID
            station_name                   M   str     站点名字
            shop_id                        M   str     店铺ID
            shop_name                      M   str     店铺名
            sales_employee_name            O   str     销售经理名字         
            order_count                    O   int     下单数量          
            abnormal_order_count           O   int     异常下单数量  
            order_id                       O   str     订单号  
            order_price                    M   float   订单金额
            coupon_price                   M   float   优惠金额  
            outstock_price                 M   float   出库金额
            abnormal_price                 M   float   异常金额
            freight_price                  M   float   运费
            tax_price                      M   float   税额
            refund_price                   M   float   实退金额
            account_price                  M   float   销售额(含运费)
            account_price_exclude_freight  M   float   销售额(不含运费)
            refund_cost                    M   float   退货成本 
            outstock_cost                  M   float   出库成本
            order_cost                     M   float   实际成本 
            sale_profit_exclude_freight    M   float   销售毛利(不含运费)
            sale_profit                    M   float   销售毛利(含运费) 
            sale_profit_rate               M   float   销售毛利率
            abnormal_order_count_rate      M   str     异常订单率
            abnormal_price_rate            M   str     异常金额率
            area_name                      M   str     区域名字
        }]
        detail_count                       M   int     总的数量
    }

report/sku/static 商品分析排行榜总览

Method: POST
请求
    q_type                      M  int   1:下单时间;3:收货时间;2.运营周期, 4: 出库时间  
    start_time                  M  date  开始时间
    end_time                    M  date  结束时间
    q                           M  str   商户名,商户id或商品名 
    category1_id_list           O  list  一级分类id
    category2_id_list           O  list  二级分类id
    pinlei_id_list              O  list  品类id
    station_id_list             O  list  站点id
    salemenu_id_list            O  list  报价单id
响应
    code                               M   int     正常返回0
    msg                                M   str     正常返回"ok"
    date{                              M   dict
        account_price                  M   float   销售额(不含运费)
        sale_profit                    M   float   销售毛利(不含运费)
        sale_profit_rate               M   float   销售毛利率(不含运费)
        sku_price_top_list             M   list[{
            sku_id                     M   str     sku_id
            sku_name                   M   str     店铺名
            account_price              M   float   销售额(不含运费)
        }]       
        sku_quantity_top_list          M   list[{
            sku_id                     M   str     sku_id
            sku_name                   M   str     店铺名
            quantity                   M   int     下单数量
        }]
        sku_outstock_quantity_top_list M   list[{
            sku_id                     M   str     sku_id
            sku_name                   M   str     店铺名
            outstock_quantity          M   int     出库数量
        }]       
        category_2_statics_list        M   list[{  10个
            account_price              M   float   销售额
            account_price_proportion   M   float   销售额占比率   
            category1_id               M   str     一级分类ID
            category1_name             M   str     一级分类名
            category2_id               M   str     二级分类ID
            category2_name             M   str     二级分类名
        }]
        category_1_statics_list        M   list[{  10个
            account_price              M   float   销售额
            account_price_proportion   M   float   销售额占比率   
            category1_id               M   str     一级分类ID
            category1_name             M   str     一级分类名
        }]
    }

report/sku/list 商品分析明细

Method: POST
请求
    q_type                             M  int      1:下单时间;3:收货时间;2.运营周期,4: 出库时间 
    start_time                         M  date     开始时间
    end_time                           M  date     结束时间
    q                                  M  str      过滤条件。商户名或商户id
    aggerate_type                      M  int      1:sku_id, 2:spu_id     
    aggerate_list                      M  list     聚合条件列表。只有三个。1.date(按每
                                                    日);2:station_id(按站点);
                                                    3.shop_id(按商户)
    sort                               M  list[
    {
        fileds                         M  int      排序的字段。值有8个类型。
                                                    1.date(日期);2.station_id(站点ID);
                                                    3.shop_id(商户ID);
                                                    4.quantity(下单数量);
                                                    5.account_price(销售额(不含运费)
                                                    );6.outstock_cost(出库成本);7.
                                                    分类;8.spu_id(商品) 
                                                    9.sale_profit(销售毛利)
                                                    10.sku_id(规格id)

        opt                            M  int      排序类型。值有两个类型。1.asc(升序_;2.desc(降序)。
    },...
    ]
    category1_id_list                  O  list  一级分类id
    category2_id_list                  O  list  二级分类id
    pinlei_id_list                     O  list  品类id
    station_id_list                    O  list  站点id
    salemenu_id_list                   O  list  报价单id
    offest                             M  int     起始位置     
    limit                              M  int     返回数量 
    address_label_id                   0  int   当值为-1时表示没有标签
响应
    code                               M   int     正常返回0
    msg                                M   str     正常返回"ok"
    data                               M   dict {
        detail_list                    M   list[{
            date                       M   str     日期
            station_id                 M   str     站点ID
            station_name               M   str     站点名字
            shop_id                    M   str     店铺ID
            shop_name                  M   str     店铺名
            sales_employee_name        M   str     销售经理名字 
            sku_id                     M   str
            sku_name                   M   str     规格名称
            spu_name                   M   str     商品名称
            category1_name             M   str     一级分类
            category2_name             M   str     二级分类
            pinlei_name                M   str     三级分类
            quantity                   M   float   下单数(基本单位)
            outstock_quantity          M   float   出库数(基本单位)   
            abnormal_amount            M   float   异常数(基本单位)
            refund_real_amount         M   float   实退数
            std_unit_name              M   str     基本单位
            sale_unit_name             M   str     销售单位
            sale_ratio                 M   str     销售单位/基本单位
            outstock_price             M   float   出库金额
            abnormal_price             M   float   异常金额
            tax_price                      M   float   税额
            refund_price                   M   float   实退金额
            account_price                  M   float   销售额(不含运费)
            avg_account_price              M   float   销售均价(不含运费)
            refund_cost                    M   float   退货成本 
            outstock_cost                  M   float   出库成本
            avg_outstock_cost              M   float   出库成本均价
            order_cost                     M   float   实际成本 
            sale_profit                    M   float   销售毛利(不含运费)
            sale_profit_rate               M   float   销售毛利率(不含运费)
            abnormal_price_rate            M   str     异常金额率
        }]
        detail_count                   M   int     总的数量
    }

report/order/export 订单分析明细异步导出(新接口)

接口     
    /report/order/export

Method
    get

请求参数:
    q_type                          M  int      1:下单时间;3:收货时间,2:运营时间, 4: 出库时间 
    start_time                      M  date     开始时间
    end_time                        M  date     结束时间
    q                               M  str      过滤条件。商户名或商户id  
    aggerate_list                   M  list     聚合条件列表。只有三个。1.date(按每日);2:station_id(按站点);3.shop_id(按商户)
    station_list                    M  list      station_id列表
    address_label_id                0  int   当值为-1时表示没有标签
响应:
    code : 0
    msg : "ok"   
    data{
            async               M          int        1:异步
            task_url            M          str        返回excel表格的url
            filename            M          str        excel表格文件名
            data                M          null       返回null
        }

report/sku/export 订单分析明细异步导出(新接口)

接口     
    /report/sku/export 
Method
    get

请求参数:
    q_type                          M  int      1:下单时间;3:收货时间, 4: 出库时间 
    start_time                      M  date     开始时间
    end_time                        M  date     结束时间
    q                               M  str      过滤条件。商户名或商户id  
    aggerate_list                   M  list     聚合条件列表。只有三个。1.date(按每日);2:station_id(按站点);3.shop_id(按商户)
    address_label_id                0  int   当值为-1时表示没有标签
    aggerate_type                   M  int      1:sku_id, 2:spu_id  
响应:
    code : 0
    msg : "ok"   
    data{
            async               M          int        1:异步
            task_url            M          str        返回excel表格的url
            filename            M          str        excel表格文件名
            data                M          null       返回null
        }

时间计划

数据双写,添加缺失字段

1.添加五个联合KEY,出库成本,退货成本,销售毛利,订阅出库单1天;

排行榜查看

已经写好,无需时间

明细查看

订单分析

按下单日期,收货日期,站点ID,商户ID排序

1.按每日、按商户、按站点、按每日+按站点、按商户+按站点、按每日+按商户、按每日+按商户+按站点聚合需要1天;

按订单金额、销售额(不含运费)、出库成本、销售毛利率(不含运费)排序

1.按每日、按商户、按站点聚合需要1天; 2.按每日+按站点、按商户+按站点、按每日+按商户聚合需要1天; 3.按每日+按商户+按站点聚合需要0.5天;

商品分析

按下单日期,收货日期,站点ID,商户ID排序

1.按每日、按商户、按站点、按每日+按站点、按商户+按站点、按每日+按商户、按每日+按商户+按站点聚合需要1.5天;

按订单金额、销售额(不含运费)、出库成本、销售毛利率(不含运费)排序

1.按站点、按每日+按商户+按站点聚合需要0.5天; 2.按每日、按商户、按每日+按商户、按每日+按站点、按商户+按站点需要1.5天

明细导出

订单分析

1.按每日、按商户、按站点、按每日+按站点、按商户+按站点、按每日+按商户导出1天 2.按每日+按商户+按站点导出需要0.5天

商品分析

1.按每日、按商户、按站点、按每日+按站点、按商户+按站点、按每日+按商户导出1天 2.按每日+按商户+按站点导出需要0.5天。