Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
af799dc5a2
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      app/task/svc/svc_hw_order.go

+ 5
- 4
app/task/svc/svc_hw_order.go View File

@@ -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)


Loading…
Cancel
Save