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)