From af799dc5a2b357a86ab545710db4a61412430ba2 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 26 Sep 2023 18:14:46 +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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/task/svc/svc_hw_order.go b/app/task/svc/svc_hw_order.go index 94d191b..e72f72a 100644 --- a/app/task/svc/svc_hw_order.go +++ b/app/task/svc/svc_hw_order.go @@ -132,9 +132,7 @@ func AddOrder(method string, order map[string]interface{}) { splitSecond := strings.Split(split[1], "p") puid := splitSecond[1] uid := splitSecond[0] - if order["modify_time"] == "" { - order["modify_time"] = order["update_time"] - } + if utils.AnyToFloat64(order["total_rebate"]) == 0 { order["total_rebate"] = order["rebate"] } @@ -168,7 +166,10 @@ func AddOrder(method string, order map[string]interface{}) { OutMealTime: int(utils.TimeStdParseUnix(utils.AnyToString(order["out_meal_time"]))), ExtendUid: puid, } - if order["refund_time"] != "" { + if order["modify_time"] == "" || order["modify_time"] == nil { + ord.UpdateTime = int(time.Now().Unix()) + } + if order["refund_time"] != "" && order["refund_time"] != nil { ord.RefundTime = int(utils.TimeStdParseUnix(utils.AnyToString(order["refund_time"]))) } one := db.GetHwOrderByOne(ord.Oid, utils.IntToStr(ord.Uid), ord.Type)