Skip to content

复制订单方案

复制订单

/station/order/recent_order/get 获取该商户订单接口(新增)

接口:   /station/order/recent_order/get
Method: GET
request :
      address_id M string 商户id
      time_config_id: M string 运营时间ID      

response:
     code    M   int     返回码,0表示成功,其他表示错误
     msg     M   string  错误信息
      {
        "data": 
             [
                {
                    "origin_total_price": "156.31", # 下单原价,单位元
                    "date_time_str": "2019-12-14 12:09:25", # 下单时间
                    "id": "PL492271", # 订单ID 
                    "merchandise_count": #商品数量
                    }
                ],

                }
            ]
 逻辑:
 根据商户id获取订单
 订单状态为-1,订单支付状态为15 过滤掉
 校验订单为有效状态



/station/order/copy 复制该商户订单商品接口(新增)

接口:   /station/order/copy
Method: GET
request :
      order_id  M string 订单id



response:
     code    M   int     返回码,0表示成功,其他表示错误
     msg     M   string  错误信息
     "data": [
             {
             attrition_rate: 0
             category_id_1: "A4507"
             category_id_2: "B21012"
             category_title_1: "水果"
             category_title_2: "进口水果"
             create_time: "2018-05-08T14:49:58.634"
             desc: ""
             id: "D3888114"
             imgs: ["825bcda7c4986bf6.jpeg"]
             is_price_timing: false   #是否时价
             is_weigh: true
             last_in_stock_price: #最新入库价
                 {
                   earlier: [], 
                   newest: 
                     {
                       purchase_supplier_name: "综合供应商",
                       price: 871,               
                       purchase_supplier_id: "T12478"
                     }
                  }

             last_purchase_price:   #最近采购价
                 {
                   earlier: []
                   newest: 
                     {
                       purchase_supplier_name: "综合供应商", 
                       price: 200, 
                       purchase_supplier_id: "T12478"
                     }
                  }
             last_quote_price:  #最近询价
                 {
                   earlier: [
                    {
                       purchase_supplier_name: "水果供应商", 
                       price: 0,
                       purchase_supplier_id: "T8524"
                    }
                           ]
                    }      
                   newest: 
                    {
                        purchase_supplier_name: "综合供应商",
                        price: 0, 
                        purchase_supplier_id: "T12478"
                    }

                 }

             modify_time: "2018-08-11T10:25:50.317"
             name: "帝王蕉"
             outer_id: ""     #自定义id
             pinlei_id: "P350044"
             purchase_create_version: 4
             purchase_spec_id: "D3888108" 
             purchase_supplier_id: "T12478"
             s_type: 0
             sale_num_least: 1
             sale_price: "45.00"  #售卖单价
             sale_ratio: 3      #售卖比例
             sale_unit_name: "包"    #销售单位名
             salemenu_id: "S6977"
             split_flag: 3
             spu_id: "C920981"
             spu_remark: null  #备注
             state: 1   #是否上架
             station_id: "T8521"
             status: 2   
             std_unit_name: "件"   #标准单位名
             stock_avg_price: 0 #库存均价
             stock_type: 1
             stocks: -99999
             supplier_name: "水果"# 报价单简称(对外)
             sync_origin_id: "D3888114" #真实交易id
             sync_state: 1
             tax_rate: 0 #税率
             unit_price: "15.00" #标准单价
             version: 3  
             quantity:1 #历史下单数


             }
             ]



 逻辑:
 根据订单id获取商品
 过滤掉该报价单里面被下架,删除的商品
 对有效商品查询最近商品详情,对订单商品需要的历史信息保存,拼接。