From 47fa66e9e47c979941a56c28ac6c478a9af7cef4 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Sep 2023 09:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/svc/svc_hw_order.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/task/svc/svc_hw_order.go b/app/task/svc/svc_hw_order.go index 2d5a56d..e49c416 100644 --- a/app/task/svc/svc_hw_order.go +++ b/app/task/svc/svc_hw_order.go @@ -136,13 +136,13 @@ func AddOrder(method string, order map[string]interface{}) { if utils.AnyToFloat64(order["total_rebate"]) == 0 { order["total_rebate"] = order["rebate"] } - if order["product_detail"] == "" && order["product_name"] != "" { + if (order["product_detail"] == nil || order["product_detail"] == "" || order["product_detail"] == "") && order["product_name"] != nil { order["product_detail"] = order["product_name"] } - if order["product_detail"] == "" && order["cinema_name"] != "" { + if (order["product_detail"] == nil || order["product_detail"] == "" || order["product_detail"] == "") && order["cinema_name"] != nil { order["product_detail"] = utils.AnyToString(order["cinema_name"]) + "-" + utils.AnyToString(order["movie_name"]) } - if order["product_detail"] == "" && order["delivery_brand_name"] != "" { + if (order["product_detail"] == nil || order["product_detail"] == "" || order["product_detail"] == "-" || order["product_detail"] == "") && order["delivery_brand_name"] != "" { order["product_detail"] = utils.AnyToString(order["delivery_brand_name"]) + "-" + utils.AnyToString(order["delivery_goods_name"]) } var ord = &model.HwOrder{