From 3f7c6ad8b690952b90b9b4081ef3c94c28ec5114 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 6 Feb 2023 18:42:37 +0800 Subject: [PATCH] update --- consume/canal_guide_order_consume.go | 1 + consume/canal_order_consume.go | 1 + es/md/es_struct.go | 1 + 3 files changed, 3 insertions(+) diff --git a/consume/canal_guide_order_consume.go b/consume/canal_guide_order_consume.go index 22a3625..20a8571 100644 --- a/consume/canal_guide_order_consume.go +++ b/consume/canal_guide_order_consume.go @@ -83,6 +83,7 @@ func handleGuideOrdTable(msg []byte) error { Uid: data.Uid, BuyerPhone: user.Phone, CostPrice: utils.StrToFloat64(data.CostPrice), + Gmv: utils.StrToFloat64(data.CostPrice) * float64(utils.StrToInt(data.ItemNum)), State: int32(utils.StrToInt(data.State)), StateZh: md.CanalGuideOrderState(int32(utils.StrToInt(data.State))).String(), GoodsNum: utils.StrToInt(data.ItemNum), diff --git a/consume/canal_order_consume.go b/consume/canal_order_consume.go index 5c7df43..7a2f2f9 100644 --- a/consume/canal_order_consume.go +++ b/consume/canal_order_consume.go @@ -110,6 +110,7 @@ func handleMallOrdTable(msg []byte) error { Uid: data.Uid, BuyerPhone: data.BuyerPhone, CostPrice: utils.StrToFloat64(data.CostPrice), + Gmv: utils.StrToFloat64(data.CostPrice) * float64(goodsNum), State: int32(utils.StrToInt(data.State)), StateZh: md.CanalOrderState(int32(utils.StrToInt(data.State))).String(), PayChannel: int32(utils.StrToInt(data.PayChannel)), diff --git a/es/md/es_struct.go b/es/md/es_struct.go index ef52248..1188549 100644 --- a/es/md/es_struct.go +++ b/es/md/es_struct.go @@ -10,6 +10,7 @@ type ZhiosOrdersEs struct { Uid string `json:"uid"` BuyerPhone string `json:"buyer_phone"` CostPrice float64 `json:"cost_price"` + Gmv float64 `json:"gmv"` State int32 `json:"state"` StateZh string `json:"state_zh"` PayTime interface{} `json:"pay_time"`