订单字段
订单字段 类型 描述 原字段
_id keyword 路由的ID(先试用订单号) stationid+时间(190707)+customize_order_id(目前是_id)
order_id keyword mysql存的订单唯一ID 无
customize_order_id keyword 用户自定义订单ID _id
out_order_id keyword 第三方order_id out_order_id
type short 订单类型(1:PL,2:LK) 无
status short 订单状态 status
pay_status short 支付状态 pay_status
settle_way short 商户结算方式 settle_way
freeze short 订单锁定状态 freeze
pstatus short pstatus
group_id int group_id 无
station_id keyword station_id station_id
time_config_id keyword 运营时间 time_config_id
order_price double 下单金额 total_price
origin_order_price double 原下单金额 origin_total_price
fake_order_price double 伪下单金额 fake_total_price
outstock_price double 出库金额 real_price
freight_price double 运费 freight
refund_price double 退货金额 refund_money 实退金额
abnormal_price double 异常金额 abnormal_money 异常金额
account_price double 应付金额(包含出库金额、运费、异常、退货、优惠券) total_pay 销售额(含运费)
coupon_price double 优惠金额 coupon_amount
paid_amount double 已支付金额 paid_amount
refund_amount double 退款金额 refund_amount
actual_amount double 实付金额 real_pay
tax_price double 税额 details.material.tax_price 总额
order_time date 下单时间 date_time
sorting_time date 分拣时间 sorting_time
outstock_time date 出库时间 出库单时间
receive_time date 收货时间,用户收到的真实时间 delivery_time
distribute_time date 配送时间 distribute_time
pay_time date 支付时间 pay_time
expire_time date 过期时间 expire_time
close_time date 真正关闭时间 close_time
latest_pay_time date 最后支付时间 latest_pay_time
refund_type short 0:不是整单退款,1:整单退款 order_refund
remark keyword 订单备注 remark
batch_remark keyword 分拣备注 batch_remark
pay_remark keyword 付款备注 pay_remark
aggregate_type integer 聚合方式 is_aggregation
client short 下单渠道 client
print_times short 打印数 print_times
purchase_task_sync_uuid short 同步采购标识 is_purchase_task_new_synced
create_time date 创建时间 create_time
modify_time date 最后修改时间 modify_time
delete_time date 删除时间 delete_time
district_code long 区域码 district_code
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.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 long 账户ID customer.uid
customer.user_name text 账户名 无
details nested sku details
details.sku_id keyword 商品ID details.id
details.sku_version int sku版本号 details.version
details.sku_name text sku名称 details.name
details.sku_attrition_rate double sku损耗率 details.attrition_rate
details.sku_is_weight short 是否称重商品 details.is_weight
details.sku_is_price_timing short 是否时价商品 details.is_price_timing
details.salemenu_id keyword 销售单ID details.salemenu_id
details.sale_price double 销售价 details.sale_price
details.origin_sale_price double 原销售价 details.origin_sale_price
details.order_price double 下单金额 details.total_item_price
details.origin_order_price double 原下单金额 details.origin_item_price
details.fake_order_price double 伪原价 details.fake_item_price
details.outstock_price double 出库金额 details.real_item_price
details.account_price double 支付金额 details.total_item_pay
details.real_account_price double 销售额 details.total_item_pay -
details.sku_tax_rate double 税率 details.tax_rate
details.sku_sale_unit_name keyword 基本单位 details.sale_unit_name
details.sku_is_clean_food short 净菜商品 details.clean_food
details.spu_remark keyword 净菜商品 details.spu_remark
details.quantity double 下单数(包含损耗 销售单位) details.quantity
details.std_quantity double 下单数(包含损耗 基本单位) details.quantity * details.material.sku_sale_ratio
details.purchase_quantity double 下单数 details.purchase_quantity
details.outstock_quantity double 出库数 details.real_quantity
details.accept_quantity double 结账数 details.accept_quantity
details.sorting_weighting_quantity double 称重数 details.weighting_quantity
details.supplier_weighting_quantity double 称重数 details.supplier_weighting_quantity
details.sorting_sale_weighting_quantity double 称重数 details.sale_weighting_quantity
details.sorting_is_weighted short 是否已称重 details.is_weighted
details.sorting_out_of_stock short 缺货标记 details.out_of_stock
details.sorting_way short 分拣类型 details.sort_way
details.price_rule_id keyword 锁价规格ID details.rule_id
details.pstatus int 物理删除 无
details.create_time date 创建时间 无
details.modify_time date 修改时间 无
details.delete_time date 删除时间 无
details.refund_request_amount double 应退数量 refunds.request_amount/tbl_refund_history.request_amount
details.refund_request_money double 退货导致的金额差异 tbl_refund_history.request_amount * details.sale_price
details.refund_real_amount double 实退数量 refunds.real_amount/tbl_refund_history.real_amount
details.refund_indemnity_money double 退货实际赔付金额 tbl_refund_history.lose_money
details.refund_price double 实退金额 tbl_refund_history.lose_money
details.refund_reason_id int 退货原因的id refunds.type_id/tbl_refund_history.exception_reason
details.refund_reason_text keyword 退货原因的文本 refunds.text/tbl_select_choose.text
details.abnormal_amount double 记账数(有异常的商品的正常数量 ) abnormals.final_amount/tbl_exception_history.final_amount details.real_abnormal_amount double 异常数 details.material.sku_std_outstock_quantity - details.abnormal_amount
details.abnormal_money_delta double 异常金额变动 abnormals.money_delta/tbl_exception_history.money_delta
details.abnormal_indemnity_money double 异常赔付金额 tbl_exception_history.lose_money
details.abnormal_reason_id int 异常原因的id abnormals.type_id/tbl_exception_history.exception_reason
details.abnormal_reason_text keyword 异常原因的文本 abnormals.type_text/tbl_select_choose.text
details.abnormal_solution_id int 解决异常办法的id tbl_exception_history.solution
details.abnormal_solution_text keyword 异常原因的文本 tbl_select_choose.text
details.material object 成本
details.material.cost double 成本价格 details.material.cost
details.material.sku_std_outstock_quantity double sku基本单位出库数 details.material.real_std_count
details.material.sku_sale_ratio double sku规格转换 details.material.sale_ratio
details.material.spu_id keyword spu_id details.material.spu_id
details.material.sku_std_sale_price double sku基本单位销售价 details.material.std_sale_price
details.material.sku_std_unit_name keyword 基本单位 details.material.std_unit_name
details.material.stock_count double 缺货任务数 details.material.stock_count
details.material.sku_std_accept_quantity double sku基本单位结账数 details.material.accept_std_count
details.material.sku_tax_price double sku税额 details.material.accept_std_count * etails.material.std_sale_price
details.material.spu_name text spu_name spu_name(新加)
details.material.spu_version int spu_version 新添加
details.material.category2_id keyword 二级分类ID category2_id(新加)
details.material.category2_name text 二级分类名 category2_name(新加)
details.material.category1_id keyword 一级分类ID category1_id(新加)
details.material.category1_name text 一级分类名 category1_name(新加)
details.material.pinlin_id keyword 品类ID pinlei_id(新加)
details.material.pinlin_name text 品类名 pinlin_name(新加)
联合key
details.sid_order_date_sku keyword 联合key [shop_id]-[order_date]-[sku_id]
details.sid_receive_date_sku keyword 联合key [shop_id]-[receive_date]-[sku_id]
details.sid_sku keyword 联合key [shop_id]-['sku_id']
details.order_date_sku keyword 联合key [order_date]-[sku_id]
details.receive_date_sku keyword 联合key [receive_date]-[sku_id]
details.outstock_cost float 出库成本 从出库单获取
details.refund_cost float 退货成本 从出库单获取计算
details.sku_cost float 实际成本 outstock_cost - refund_cost
details.sale_profit float 销售毛利 account_price - sku_cost
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 keyword 异常原因的id abnormals.type_id
order_abnormals.abnormal_solution_text keyword 异常原因的文本 abnormals.type_text
has_exception int 存在异常 无
outstock_cost float 出库成本 从出库单获取
refund_cost float 退货成本 从出库单获取计算
order_cost float 实际成本 outstock_cost - refund_cost
sale_profit float 销售毛利 account_price - order_cost
联合key
sid_order_date keyword 联合key [shop_id]-[order_date]
sid_receive_date keyword 联合key [shop_id]-[receive_date]
sid_station_id keyword 联合key [shop_id]-[station_id]
订单的map
PUT /order/order/_mapping
{
"dynamic": true,
"properties": {
"sid_order_date": {
"type": "keyword"
},
"sid_receive_date": {
"type": "keyword"
},
"sid_station_id": {
"type": "keyword"
},
"outstock_cost":{
"type": "double",
"coerce": true
},
"refund_cost":{
"type": "double",
"coerce": true
},
"order_cost":{
"type": "double",
"coerce": true
},
"sale_profit":{
"type": "double",
"coerce": true
},
"customize_order_id": {
"type": "keyword"
},
"order_id": {
"type": "keyword"
},
"out_order_id": {
"type": "keyword"
},
"type":{
"type": "short",
"coerce": true
},
"status":{
"type": "short",
"coerce": true
},
"pay_status":{
"type": "short",
"coerce": true
},
"has_exception":{
"type": "short",
"coerce": true
},
"settle_way":{
"type": "short",
"coerce": true
},
"freeze":{
"type": "short",
"coerce": true
},
"pstatus":{
"type": "short",
"coerce": true
},
"group_id":{
"type": "integer",
"coerce": true
},
"station_id":{
"type": "keyword"
},
"time_config_id":{
"type": "keyword"
},
"order_price":{
"type": "double",
"coerce": true
},
"tax_price":{
"type": "double",
"coerce": true
},
"origin_order_price":{
"type": "double",
"coerce": true
},
"fake_order_price":{
"type": "double",
"coerce": true
},
"outstock_price":{
"type": "double",
"coerce": true
},
"freight_price":{
"type": "double",
"coerce": true
},
"refund_price":{
"type": "double",
"coerce": true
},
"abnormal_price":{
"type": "double",
"coerce": true
},
"account_price":{
"type": "double",
"coerce": true
},
"paid_amount":{
"type": "double",
"coerce": true
},
"refund_amount":{
"type": "double",
"coerce": true
},
"actual_amount":{
"type": "double",
"coerce": true
},
"coupon_price":{
"type": "double",
"coerce": true
},
"order_time":{
"type": "date"
},
"outstock_time":{
"type": "date"
},
"sorting_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"
},
"refund_type":{
"type":"short",
"coerce": true
},
"has_pic":{
"type":"integer",
"coerce": true
},
"remark":{
"type":"keyword"
},
"batch_remark":{
"type":"keyword"
},
"pay_remark":{
"type":"keyword"
},
"aggregate_type":{
"type":"integer",
"coerce": true
},
"client":{
"type":"short",
"coerce": true
},
"print_times":{
"type":"short",
"coerce": true
},
"purchase_task_sync_uuid":{
"type":"short",
"coerce": true
},
"create_time":{
"type": "date"
},
"modify_time":{
"type": "date"
},
"delete_time":{
"type": "date"
},
"district_code":{
"type": "long",
"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
},
"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"
}
}
},
"user_id":{
"type": "long",
"coerce": true
},
"user_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
}
}
},
"details":{
"type": "nested",
"properties": {
"refund_price":{
"type": "double",
"coerce": true
},
"sid_order_date_sku":{
"type": "keyword"
},
"sid_receive_date_sku":{
"type": "keyword"
},
"sid_sku":{
"type": "keyword"
},
"order_date_sku":{
"type": "keyword"
},
"receive_date_sku":{
"type": "keyword"
},
"sku_id":{
"type": "keyword"
},
"sku_version":{
"type": "integer",
"coerce": true
},
"sku_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
},
"outstock_cost":{
"type": "double",
"coerce": true
},
"refund_cost":{
"type": "double",
"coerce": true
},
"sku_cost":{
"type": "double",
"coerce": true
},
"sale_profit":{
"type": "double",
"coerce": true
},
"sku_attrition_rate":{
"type": "double",
"coerce": true
},
"sku_is_weight":{
"type": "short",
"coerce": true
},
"sku_is_price_timing":{
"type": "short",
"coerce": true
},
"salemenu_id":{
"type": "keyword"
},
"sale_price":{
"type": "double",
"coerce": true
},
"origin_sale_price":{
"type": "double",
"coerce": true
},
"origin_order_price":{
"type": "double",
"coerce": true
},
"fake_order_price":{
"type": "double",
"coerce": true
},
"outstock_price":{
"type": "double",
"coerce": true
},
"account_price":{
"type": "double",
"coerce": true
},
"quantity":{
"type": "double",
"coerce": true
},
"purchase_quantity":{
"type": "double",
"coerce": true
},
"outstock_quantity":{
"type": "double",
"coerce": true
},
"accept_quantity":{
"type": "double",
"coerce": true
},
"sorting_weighting_quantity":{
"type": "double",
"coerce": true
},
"sorting_sale_weighting_quantity":{
"type": "double",
"coerce": true
},
"sku_tax_rate":{
"type": "double",
"coerce": true
},
"supplier_weighting_quantity":{
"type": "double",
"coerce": true
},
"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"
},
"sort_num":{
"type": "integer",
"coerce": true
},
"sku_sale_unit_name":{
"type": "keyword"
},
"spu_remark":{
"type": "keyword"
},
"sku_is_clean_food":{
"type": "short",
"coerce": true
},
"pstatus":{
"type": "integer",
"coerce": true
},
"create_time":{
"type": "date"
},
"modify_time":{
"type": "date"
},
"delete_time":{
"type": "date"
},
"refund_request_amount":{
"type": "double",
"coerce": true
},
"refund_request_money":{
"type": "double",
"coerce": true
},
"refund_real_amount":{
"type": "double",
"coerce": true
},
"refund_indemnity_money":{
"type": "double",
"coerce": true
},
"refund_reason_id":{
"type": "integer",
"coerce": true
},
"refund_reason_text":{
"type": "keyword"
},
"abnormal_amount":{
"type": "double",
"coerce": true
},
"abnormal_money_delta":{
"type": "double",
"coerce": true
},
"abnormal_indemnity_money":{
"type": "double",
"coerce": true
},
"abnormal_reason_id":{
"type": "integer"
},
"abnormal_reason_text":{
"type": "keyword"
},
"abnormal_solution_id":{
"type": "integer"
},
"abnormal_solution_text":{
"type": "keyword"
},
"material":{
"type": "object",
"properties": {
"accept_std_count":{
"type": "double",
"coerce": true
},
"cost":{
"type": "double",
"coerce": true
},
"sku_std_outstock_quantity":{
"type": "double",
"coerce": true
},
"sku_std_accept_quantity":{
"type": "double",
"coerce": true
},
"sku_tax_price":{
"type": "double",
"coerce": true
},
"sku_sale_ratio":{
"type": "double",
"coerce": true
},
"sku_std_sale_price":{
"type": "double",
"coerce": true
},
"stock_count":{
"type": "double",
"coerce": true
},
"spu_id":{
"type": "keyword"
},
"sku_std_unit_name":{
"type": "keyword"
},
"category2_id":{
"type": "keyword"
},
"category1_id":{
"type": "keyword"
},
"pinlin_id":{
"type": "keyword"
},
"spu_version":{
"type":"integer",
"coerce": true
},
"spu_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
},
"category2_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
},
"category1_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
},
"pinlin_name":{
"type": "text",
"fields": {
"pinyin": {
"type": "text",
"analyzer": "ik_pinyin_analyzer"
}
}
}
}
}
}
},
"order_abnormals":{
"type": "nested",
"properties": {
"abnormal_money_delta":{
"type": "double",
"coerce": true
},
"abnormal_reason_id":{
"type": "integer"
},
"abnormal_reason_text":{
"type": "keyword"
},
"abnormal_solution_id":{
"type": "integer"
},
"abnormal_solution_text":{
"type": "keyword"
}
}
}
}
}