diff --git a/business/elm/controller/order.go b/business/elm/controller/order.go index 4e2c2274b..f02480039 100644 --- a/business/elm/controller/order.go +++ b/business/elm/controller/order.go @@ -72,7 +72,7 @@ func (o *OrderController) NewOrder(msg *elmapi.CallbackMsg, orderId string, user globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec) retVal = errResponseDBError } else { - if created || rec.Type != msg.Type { + if created || rec.Type < msg.Type { // todo 回调消息里已经有详情,这里是否有必要再取一次? result, err := globals2.ElmAPI.GetOrder(orderId) if err != nil { @@ -113,7 +113,7 @@ func (o *OrderController) OrderStatusChanged(msg *elmapi.CallbackMsg, orderId st if err != nil { globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec) } else { - if rec.Type != msg.Type { + if rec.Type < msg.Type { err = globals2.FreshFoodAPI.ELMOrderStatus(orderId, msg.Type, utils.GetCurTimeStr()) if err == nil { rec.Type = msg.Type