Skip to content

ES字段确定

订单主体字段

ES字段                类型          描述                     原字段 
_id                  keyword      路由的ID                  mysql存的订单ID                  
old_order_id         keyword      老订单ID                  mongo存的订单ID
out_order_id         keyword      第三方order_id            out_order_id 
type                 short        订单类型(1:PL,2:LK)       无
group_id             int          group_id                 无  
station_id           keyword      station_id               station_id
time_config_id       keyword      运营时间                  time_conf
print_times          short        打印数                    print_times 
aggregate_type       integer      聚合方式                  is_aggregation
client               short        下单渠道                  client
settle_way           short        商户结算方式               settle_way
refund_type          short        0:不是整单退款,1:整单退款   order_refund
has_exception        int          存在异常                   无            后添加
has_pic              int          存在照片                   has_pic 
district_code        keyword      区域码                    district_code  
fee_type             keyword      币种                      fee_type


remark               object       备注
remark.remark        text         订单备注                  remark
remark.batch_remark  text         分拣备注                  batch_remark
remark.pay_remark    text         付款备注                  pay_remark

status               object       状态                     订单状态类的信息
status.status        short        订单状态                  status
status.pay_status    short        支付状态                  pay_status
status.freeze        short        订单锁定状态               freeze
status.pstatus       short                                 pstatus


price                      object       金额                         
price.order_price          double       下单金额             total_price
price.origin_order_price   double       原下单金额           origin_total_price
price.fake_order_price     double       伪下单金额           fake_total_price
price.outstock_price       double       出库金额             real_price
price.freight_price        double       运费                freight                 
price.refund_price         double       退货金额             refund_money              实退金额
price.abnormal_price       double       异常金额             abnormal_money             异常金额
price.account_price        double       应付金额(包含出库金额、运费、异常、退货、优惠券)  total_pay           销售额(含运费)                   
price.coupon_price         double       优惠金额             coupon_amount
price.paid_amount          double       已支付金额           paid_amount
price.refund_amount        double       退款金额             refund_amount
price.actual_amount        double       实付金额             real_pay  
price.tax_price            double       税额                details.material.tax_price 总额
price.sale_profit          float        销售毛利             account_price - order_cost
price.outstock_cost        float        出库成本             从出库单获取
price.refund_cost          float        退货成本             从出库单获取计算
price.order_cost           float        实际成本             outstock_cost - refund_cost


time                 object        时间
time.order_time      date         下单时间                       date_time
time.sorting_time    date         分拣时间                       sorting_time
time.receive_time    date         收货时间,用户收到的真实时间      delivery_time 
time.distribute_time date         配送时间                       distribute_time
time.pay_time        date         支付时间                       pay_time
time.expire_time     date         过期时间                       expire_time
time.close_time      date         真正关闭时间                    close_time
time.delete_time     date         删除时间                       delete_time  
time.latest_pay_time date         最后支付时间                    latest_pay_time
time.create_time     date         创建时间                       create_time         
time.modify_time     date         最后修改时间                    modify_time                    
time.out_stock_time  date         出库时间                       从出库单获取


customer                     object    商户信息          customer
customer.shop_name           text      店铺名            customer.extend.resname
customer.shop_id             keyword   店铺ID            customer.address_id    
customer.area_id             long      区域号            customer.address_sign_id
customer.customer_pay_method short     付款方式          customer.extender.order_pay_method
customer.shop_address        text      店铺地址          customer.address
customer.receive_begin_time  date      收货开始时间       customer.receive_begin_time
customer.receive_end_time    date      收货截止时间       customer.receive_end_time
customer.receiver_name       text      收货人名字         customer.receiver_name
customer.receiver_phone      keyword   收货人电话         customer.receiver_phone
customer.user_id             keyword   账户ID            customer.uid
customer.user_name           text      账户名             无
customer.receive_way         short                       customer.receive_way
customer.pick_up_st_id       long                        customer.pick_up_st_id


order_abnormals                         nest     新增(关于订单的异常,非sku异常)                
order_abnormals.abnormal_money_delta    double   异常金额变动            abnormals.money_delta
order_abnormals.abnormal_reason_id      keyword  异常原因的id           abnormals.type_id
order_abnormals.abnormal_reason_text    keyword  异常原因的文本          abnormals.type_text
order_abnormals.abnormal_solution_id    integer  异常原因的id           abnormals.type_id
order_abnormals.abnormal_solution_text  keyword  异常原因的文本          abnormals.type_text


unique_key                    object    联合key
unique_key.sid_out_stock_date keyword   联合key         [shop_id]-[out_stock_date]
unique_key.sid_order_date     keyword   联合key         [shop_id]-[order_date]
unique_key.sid_receive_date   keyword   联合key         [shop_id]-[receive_date]
unique_key.sid_station_id     keyword   联合key         [shop_id]-[station_id]
es_create_time                date      es的订单创建时间
es_modify_time                date      es的订单修改时间

商品字段

ES字段                类型          描述                     原字段 
_id                  keyword      路由的ID                  mysql的订单ID+sku_id
order_id             keyword      订单ID                   mysql存的订单ID  
group_id             int          group_id                 无  
station_id           keyword      station_id               station_id
sku_id               keyword      商品ID                   details.id
sku_version          int          sku版本号                details.version 
sku_name             text         sku名称                  details.name                      
sku_attrition_rate   double       sku损耗率                details.attrition_rate
sku_is_weight        short        是否称重商品              details.is_weight 
sku_is_price_timing  short        是否时价商品              details.is_price_timing
salemenu_id          keyword      销售单ID                 details.salemenu_id
sku_tax_rate         double       税率                    details.tax_rate
sku_sale_unit_name   keyword      基本单位                 details.sale_unit_name
sku_is_clean_food    short        净菜商品                 details.clean_food
spu_remark           text         商品备注                 details.spu_remark
sorting_is_weighted  short        是否已称重               details.is_weighted
sorting_out_of_stock short        缺货标记                 details.out_of_stock
sorting_way          short        分拣类型                 details.sort_way 
price_rule_id        keyword      锁价规格ID               details.rule_id
pstatus              short        物理状态                 details.pstatus


refund                           object     退货    
refund.refund_request_amount     double     应退数量              refunds.request_amount/tbl_refund_history.request_amount
refund.refund_request_money      double     退货导致的金额差异      tbl_refund_history.request_amount * details.sale_price
refund.refund_real_amount        double     实退数量              refunds.real_amount/tbl_refund_history.real_amount
refund.refund_indemnity_money    double     退货实际赔付金额        tbl_refund_history.lose_money
refund.refund_price              double     实退金额               tbl_refund_history.lose_money
refund.refund_reason_id          integer    退货原因的id           refunds.type_id/tbl_refund_history.exception_reason
refund.refund_reason_text        text       退货原因的文本          refunds.text/tbl_select_choose.text

abnormal                         object     异常
abnormal_amount                  double     记账数(有异常的商品的正常数量 ) abnormals.final_amount/tbl_exception_history.final_amount       
real_abnormal_amount             double     异常数                details.material.sku_std_outstock_quantity - details.abnormal_amount
abnormal_money_delta             double     异常金额变动           abnormals.money_delta/tbl_exception_history.money_delta 
abnormal_indemnity_money         double     异常赔付金额           tbl_exception_history.lose_money
abnormal_reason_id               int        异常原因的id           abnormals.type_id/tbl_exception_history.exception_reason
abnormal_reason_text             text       异常原因的文本         abnormals.type_text/tbl_select_choose.text
abnormal_solution_id             int        解决异常办法的id            tbl_exception_history.solution
abnormal_solution_text           text       异常原因的文本              tbl_select_choose.text


material                            object   成本
material.std_quantity               double   下单数(包含损耗 基本单位)  details.quantity * details.material.sku_sale_ratio    
material.cost                       double   成本价格            details.material.cost
material.sku_std_outstock_quantity  double   sku基本单位出库数    details.material.real_std_count    
material.sku_sale_ratio             double   sku规格转换         details.material.sale_ratio                  
material.spu_id                     keyword  spu_id             details.material.spu_id
material.sku_std_sale_price         double   sku基本单位销售价    details.material.std_sale_price   
material.sku_std_unit_name          keyword  基本单位            details.material.std_unit_name         
material.stock_count                double   缺货任务数           details.material.stock_count
material.sku_std_accept_quantity    double  sku基本单位结账数    details.material.accept_std_count
material.sku_tax_price              double   sku税额             details.material.accept_std_count *  details.material.std_sale_price
material.spu_version                int      spu_version        details.material.spu_version 
material.spu_name                   text     spu_name           spu_name(新加)
material.category2_id               keyword  二级分类ID          category2_id(新加)
material.category2_name             text     二级分类名          category2_name(新加)
material.category1_id               keyword  一级分类ID          category1_id(新加)               
material.category1_name             text     一级分类名          category1_name(新加)
material.pinlei_id                  keyword  品类ID             pinlei_id(新加)
material.pinlei_name                text     品类名             pinlin_name(新加)


quantity                                   object      数量
quantity.quantity                         double      下单数(包含损耗 销售单位)     details.quantity
quantity.purchase_quantity                double      下单数                     details.purchase_quantity
quantity.outstock_quantity                double      出库数                     details.real_quantity
quantity.accept_quantity                  double      结账数                     details.accept_quantity
quantity.sorting_weighting_quantity       double      称重数                     details.weighting_quantity
quantity.supplier_weighting_quantity      double                                details.supplier_weighting_quantity
quantity.sorting_sale_weighting_quantity  double                                details.sale_weighting_quantity
quantity.sorting_saleunit_weighting_quantity double                             details. sorting_saleunit_weighting_quantity

price                              object
price.sale_price                   double        销售价               details.sale_price
price.origin_sale_price            double        原销售价              details.origin_sale_price 
price.order_price                  double        下单金额              details.total_item_price
price.origin_order_price           double        原下单金额            details.origin_item_price
price.fake_order_price             double        伪原价                details.fake_item_price
price.outstock_price               double        出库金额              details.real_item_price
price.account_price                double        支付金额              details.total_item_pay
price.real_account_price           double        销售额                details.outstock_price  + details.abnormal_money_delta - details.details
price.outstock_cost                float         出库成本               从出库单获取
price.refund_cost                  float         退货成本               从出库单获取计算
price.sku_cost                     float         实际成本               outstock_cost - refund_cost
price.sale_profit                  float         销售毛利               account_price - sku_cost


order                        object       订单信息
order.old_order_id           keyword      老订单好                  mongo存的订单ID
order.out_order_id           keyword      第三方order_id            out_order_id 
order.time_config_id         keyword      运营时间                  time_conf
order.aggregate_type         short        聚合方式                  is_aggregation
order.client                 short        下单渠道                  client
order.settle_way             short        商户结算方式               settle_way  
order.fee_type               keyword      币种                      fee_type
order.district_code          keyword      区域码             b      district_code

order.status               object       状态                     订单状态类的信息
order.status.status        short        订单状态                  status
order.status.pay_status    short        支付状态                  pay_status
order.status.freeze        short        订单锁定状态               freeze
order.status.pstatus       short                                 pstatus

order.customer                     object    商户信息          customer
order.customer.shop_name           text      店铺名            customer.extend.resname
order.customer.shop_id             keyword   店铺ID            customer.address_id    
order.customer.area_id             long      区域号            customer.address_sign_id
order.customer.customer_pay_method short     付款方式          customer.extender.order_pay_method
order.customer.shop_address        text      店铺地址          customer.address
order.customer.receive_begin_time  date      收货开始时间       customer.receive_begin_time
order.customer.receive_end_time    date      收货截止时间       customer.receive_end_time
order.customer.receiver_name       text      收货人名字         customer.receiver_name
order.customer.receiver_phone      keyword   收货人电话         customer.receiver_phone
order.customer.user_id             long      账户ID            customer.uid
order.customer.user_name           text      账户名             无

order.time                         object        时间
order.time.order_time              date         下单时间                       date_time
order.time.sorting_time            date         分拣时间                       sorting_time
order.time.outstock_time           date         出库时间                       出库单时间
order.time.receive_time            date         收货时间,用户收到的真实时间      delivery_time 
order.time.distribute_time         date         配送时间                       distribute_time
order.time.pay_time                date         支付时间                       pay_time
order.time.expire_time             date         过期时间                       expire_time
order.time.close_time              date         真正关闭时间                    close_time
order.time.latest_pay_time         date         最后支付时间                    latest_pay_time
order.time.create_time             date         创建时间                       create_time         
order.time.modify_time             date         最后修改时间                    modify_time
order.time.delete_time             date         删除时间                       delete_time                      
order.time.out_stock_time          date         出库时间                       从出库单获取


unique_key                         object       联合key
unique_key.sid_order_date_sku      keyword      联合key         [shop_id]-[order_date]-[sku_id]
unique_key.sid_receive_date_sku    keyword      联合key         [shop_id]-[receive_date]-[sku_id]
unique_key.sid_out_stock_date_sku  keyword      联合key         [shop_id]-[out_stock_date]-[sku_id]
unique_key.sid_sku                 keyword      联合key         [shop_id]-['sku_id']
unique_key.order_date_sku          keyword      联合key         [order_date]-[sku_id]
unique_key.receive_date_sku        keyword      联合key         [receive_date]-[sku_id]
unique_key.out_stock_date_sku      keyword      联合key         [out_stock_date]-[sku_id]

map

索引配置

PUT /order/
{ 
    "settings": {
     "index.mapping.ignore_malformed": false,
     "index.number_of_shards" : 10,
     "index.number_of_replicas": 1,
     "index.analysis":{
       "analyzer": {
                "ik_pinyin_analyzer": {
                    "type": "custom",
                    "tokenizer": "ik_smart",
                    "filter": ["my_pinyin","word_delimiter"]
                }
            },
            "filter": {
                "my_pinyin": {
                    "type": "pinyin",
                    "keep_separate_first_letter": true,
                    "keep_none_chinese_together": true,
                    "keep_none_chinese_in_joined_full_pinyin": true,
                    "keep_original":true
                }
            }
        }
    }
}
PUT /order__detail/
{ 
    "settings": {
     "index.mapping.ignore_malformed": false,
     "index.number_of_shards" : 10,
     "index.number_of_replicas": 1,
     "index.analysis":{
       "analyzer": {
                "ik_pinyin_analyzer": {
                    "type": "custom",
                    "tokenizer": "ik_smart",
                    "filter": ["my_pinyin","word_delimiter"]
                }
            },
            "filter": {
                "my_pinyin": {
                    "type": "pinyin",
                    "keep_separate_first_letter": true,
                    "keep_none_chinese_together": true,
                    "keep_none_chinese_in_joined_full_pinyin": true,
                    "keep_original":true
                }
            }
        }
    }
}

订单map

PUT /order/order/_mapping
{
    "dynamic": true,
    "properties": {
        "old_order_id":{
            "type": "keyword", 
            "doc_values": false
        },
        "out_order_id":{
            "type": "keyword"
        },
        "type":{
            "type": "short",
            "coerce": true
        },
        "group_id":{
            "type": "integer"
        },
        "station_id":{
            "type": "keyword"
        },
        "time_config_id":{
            "type": "keyword"
        },
        "print_times": {
            "type": "integer",
            "coerce": true
        },
        "aggregate_type":{
            "type": "short",
            "coerce": true
        },  
        "client":{
            "type": "short",
            "coerce": true
        },         
        "settle_way":{
            "type": "short",
            "coerce": true
        },      
        "refund_type":{
            "type": "short",
            "coerce": true
        },     
        "has_exception":{
            "type": "short",
            "coerce": true
        }   
        "has_pic":{
            "type": "short",
            "coerce": true
        },         
        "fee_type":{
            "type": "keyword"
        },
        "district_code":{
            "type": "keyword"
        },
        "remark":{
            "type": "object",
            "properties": {
                "remark":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "batch_remark":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "pay_remark":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                }
            }
        },
        "status":{
            "type": "object",
            "properties": {
                "status":{
                    "type": "short",
                    "coerce": true
                },
                "pay_status":{
                    "type": "short",
                    "coerce": true
                },
                "freeze":{
                    "type": "short",
                    "coerce": true
                },
                "pstatus":{
                    "type": "short",
                    "coerce": true
                }
            }
        },
        "price":{
            "type": "object",
            "properties": {
                "order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "origin_order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "fake_order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "outstock_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "freight_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "abnormal_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "account_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "coupon_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "actual_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "tax_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sale_profit":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "outstock_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "order_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                }
            }
        },
        "time":{
            "type": "object",
            "properties": {
                "order_time":{
                    "type": "date"
                },
                "sorting_time":{
                    "type": "date"
                },
                "outstock_time":{
                    "type": "date"
                },
                "receive_time":{
                    "type": "date"
                },
                "distribute_time":{
                    "type": "date"
                },
                "pay_time":{
                    "type": "date"
                },
                "expire_time":{
                    "type": "date"
                },
                "close_time":{
                    "type": "date"
                },
                "latest_pay_time":{
                    "type": "date"
                },
                "create_time":{
                    "type": "date"
                },
                "modify_time":{
                    "type": "date"
                },
                "delete_time":{
                    "type": "date"
                },
                "out_stock_time":{
                    "type": "date"
                }
            }
        },
        "customer":{
            "type": "object",
            "properties": {
                "shop_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "shop_id":{
                    "type": "keyword"
                },
                "area_id":{
                    "type": "long",
                    "coerce": true
                },
                "customer_pay_method": {
                    "type": "short",
                    "coerce": true
                },
                "shop_address": {
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "receive_begin_time":{
                     "type": "date"
                },
                "receive_end_time":{
                     "type": "date"
                },
                "receiver_name": {
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "receiver_phone":{
                    "type": "keyword"
                },
                "user_id":{
                    "type": "keyword"
                },
                "user_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "pick_up_st_id":{
                    "type":"long",
                    "coerce": true
                },
                "receive_way":{
                     "type": "short",
                    "coerce": true
                }
            }
        },
        "order_abnormals":{
            "type": "nested",
            "properties": {
                "abnormal_money_delta":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "abnormal_reason_id":{
                    "type": "keyword"
                },
                "abnormal_reason_text":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "abnormal_solution_id":{
                    "type": "integer",
                    "coerce": true
                },
                "abnormal_solution_text":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                }
            }
        },
        "unique_key":{
            "type": "object",
            "properties": {
                "sid_out_stock_date":{
                    "type": "keyword"
                },
                "sid_order_date":{
                    "type": "keyword"
                },
                "sid_receive_date":{
                    "type": "keyword"
                },
                "sid_station_id":{
                    "type": "keyword"
                }
            }
        }    
    }
}

sku的map

PUT /order_detail/order_detail/_mapping
{
    "dynamic": true,
    "properties": {
        "order_id":{
            "type": "keyword"
        },
        "group_id":{
            "type": "integer"
        },
        "station_id":{
            "type": "keyword"
        },
        "sku_id":{
            "type": "keyword"
        },
        "sku_version":{
            "type": "integer",
            "coerce": true
        },
        "sku_name":{
            "type": "text",
            "fields": {
                "pinyin": {
                "type": "text",
                "analyzer": "ik_pinyin_analyzer"
                }
            }
        },
        "sku_attrition_rate":{
            "type": "scaled_float",
            "scaling_factor": 10000
        },
        "sku_is_weight":{
            "type": "short",
            "coerce": true
        },
        "sku_is_price_timing":{
            "type": "short",
            "coerce": true
        },
        "salemenu_id":{
            "type": "keyword"
        },
        "sku_tax_rate":{
            "type": "scaled_float",
            "scaling_factor": 10000
        },
        "sku_sale_unit_name":{
            "type": "keyword"
        },
        "sku_is_clean_food":{
            "type": "short",
            "coerce": true
        },
        "spu_remark":{
            "type": "text",
            "fields": {
                "pinyin": {
                "type": "text",
                "analyzer": "ik_pinyin_analyzer"
                }
            }
        },
        "sorting_is_weighted":{
            "type": "short",
            "coerce": true
        },
        "sorting_out_of_stock":{
            "type": "short",
            "coerce": true
        },
        "sorting_way":{
            "type": "short",
            "coerce": true
        },
        "price_rule_id":{
            "type": "keyword"
        },
        "pstatus": {
            "type": "short"
        },
        "refund":{
            "type":"object",
            "properties":{
                "refund_request_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_request_money":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_real_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_indemnity_money":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_reason_id":{
                    "type": "integer",
                    "coerce": true
                },
                "refund_reason_text":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                }
            }
        },
        "abnormal":{
            "type":"object",
            "properties":{
                "abnormal_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "real_abnormal_amount":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "abnormal_money_delta":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "abnormal_indemnity_money":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "abnormal_reason_id":{
                    "type": "integer",
                    "coerce": true
                },
                "abnormal_reason_text":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "abnormal_solution_id":{
                    "type": "integer",
                    "coerce": true
                },
                "abnormal_solution_text":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                }
            }
        },
        "material":{
            "type":"object",
            "properties":{
                "std_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_std_outstock_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_sale_ratio":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "spu_id":{
                    "type": "keyword"
                },
                "sku_std_sale_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_std_unit_name":{
                    "type": "keyword"
                },
                "stock_count":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_std_accept_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_tax_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "spu_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "spu_version":{
                    "type": "integer",
                    "coerce": true
                },
                "category2_id":{
                    "type": "keyword"
                },
                "category2_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "category1_id":{
                    "type": "keyword"
                },
                "category1_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                },
                "pinlei_id":{
                    "type": "keyword"
                },
                "pinlei_name":{
                    "type": "text",
                    "fields": {
                        "pinyin": {
                        "type": "text",
                        "analyzer": "ik_pinyin_analyzer"
                        }
                    }
                }
            }
        },
        "quantity":{
            "type":"object",
            "properties":{
                "quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "purchase_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "outstock_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "accept_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sorting_weighting_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "supplier_weighting_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sorting_sale_weighting_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sorting_saleunit_weighting_quantity":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                }
            }
        },
        "price":{
            "type":"object",
            "properties":{
                "sale_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "origin_sale_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "origin_order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "fake_order_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "outstock_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "account_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "real_account_price":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "outstock_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "refund_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "order_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sku_cost":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                },
                "sale_profit":{
                    "type": "scaled_float",
                    "scaling_factor": 10000
                }
            }
        },
        "order":{
            "type":"object",
            "properties":{
                "old_order_id":{
                    "type": "keyword"
                },
                "out_order_id":{
                    "type": "keyword"
                },
                "time_config_id":{
                    "type": "keyword"
                },
                "aggregate_type":{
                    "type": "short",
                    "coerce": true
                },  
                "client":{
                    "type": "short",
                    "coerce": true
                },         
                "settle_way":{
                    "type": "short",
                    "coerce": true
                },
                "fee_type":{
                    "type": "keyword"
                },
                "district_code":{
                    "type": "keyword"
                },
                "status":{
                    "type": "object",
                    "properties": {
                        "status":{
                            "type": "short",
                            "coerce": true
                        },
                        "pay_status":{
                            "type": "short",
                            "coerce": true
                        },
                        "freeze":{
                            "type": "short",
                            "coerce": true
                        },
                        "pstatus":{
                            "type": "short",
                            "coerce": true
                        }
                    }
                },
                "customer":{
                    "type": "object",
                    "properties": {
                        "shop_name":{
                            "type": "text",
                            "fields": {
                                "pinyin": {
                                "type": "text",
                                "analyzer": "ik_pinyin_analyzer"
                                }
                            }
                        },
                        "shop_id":{
                            "type": "keyword"
                        },
                        "area_id":{
                            "type": "long",
                            "coerce": true
                        },
                        "customer_pay_method": {
                            "type": "short",
                            "coerce": true
                        },
                        "shop_address": {
                            "type": "text",
                            "fields": {
                                "pinyin": {
                                "type": "text",
                                "analyzer": "ik_pinyin_analyzer"
                                }
                            }
                        },
                        "receive_begin_time":{
                            "type": "date"
                        },
                        "receive_end_time":{
                            "type": "date"
                        },
                        "receiver_name": {
                            "type": "text",
                            "fields": {
                                "pinyin": {
                                "type": "text",
                                "analyzer": "ik_pinyin_analyzer"
                                }
                            }
                        },
                        "receiver_phone":{
                            "type": "keyword"
                        },
                        "user_id":{
                            "type": "keyword"
                        },
                        "user_name":{
                            "type": "text",
                            "fields": {
                                "pinyin": {
                                "type": "text",
                                "analyzer": "ik_pinyin_analyzer"
                                }
                            }
                        },
                        "pick_up_st_id":{
                            "type":"long",
                            "coerce": true
                        },
                        "receive_way":{
                            "type": "short",
                            "coerce": true
                        }
                    }
                },
                "time":{
                    "type": "object",
                    "properties": {
                        "order_time":{
                            "type": "date"
                        },
                        "sorting_time":{
                            "type": "date"
                        },
                        "outstock_time":{
                            "type": "date"
                        },
                        "receive_time":{
                            "type": "date"
                        },
                        "distribute_time":{
                            "type": "date"
                        },
                        "pay_time":{
                            "type": "date"
                        },
                        "expire_time":{
                            "type": "date"
                        },
                        "close_time":{
                            "type": "date"
                        },
                        "latest_pay_time":{
                            "type": "date"
                        },
                        "create_time":{
                            "type": "date"
                        },
                        "modify_time":{
                            "type": "date"
                        },
                        "delete_time":{
                            "type": "date"
                        },
                        "out_stock_time":{
                            "type": "date"
                        }
                    }
                }     
            }
        },
        "unique_key":{
            "type": "object",
            "properties": {
                "sid_order_date_sku":{
                    "type": "keyword"
                },
                "sid_receive_date_sku":{
                    "type": "keyword"
                },
                "sid_out_stock_date_sku":{
                    "type": "keyword"
                },
                "sid_sku":{
                    "type": "keyword"
                },
                "order_date_sku":{
                    "type": "keyword"
                },
                "receive_date_sku":{
                    "type": "keyword"
                },
                "out_stock_date_sku":{
                    "type": "keyword"
                }
            }
        } 
    }
}

MA接口修改

report/sku/static

report/sku/list

sku/export

时间计划表

9.12        修改同步脚本 将sku拆出来
9.13-9.15   放假
9.16        修改同步脚本 将sku拆出来
9.17-9.20   修改商品分析部分的代码
9.21-9.22   放假
9.23-24     自测修改问题